here's what I do.
First, I have this macro:
%macro email(email=,cc=,subject=,message=,attach=); filename mymail email "&email"; data _null_; file mymail to=("&email") %if %length(&cc)>0 %then %do; cc=(&cc) %end; %if %length(&attach)>0 %then %do; attach=(&attach) %end; subject="&subject."; put "&message."; run; %mend;
And I invoke it like this:
%let endtime = %sysfunc(time(),time8.0) ; %let pgmpath = %sysfunc(pathname(output)); %let currprog = &_CLIENTPROJECTNAME; %email(email=&EMAILADDRESS ,subject=&currprog ,cc='person1@domain.com' 'person2@domain.com' ,message=has finished. started at &starttime and ended at &endtime ,attach="&pgmpath./file1.pdf" "&pgmpath./file2.html" "&pgmpath./file3.rtf" );
So if you populated the cc list and put single quotes around each value you should be good to go.
... View more