Desktop productivity for business analysts and programmers

SAS Enterprise Guide Email Multiple Attachments

Reply
New Contributor
Posts: 4

SAS Enterprise Guide Email Multiple Attachments

[ Edited ]

My company has recently switched to SAS Enterprise Guide and I am updating all my codes. One thing that I need to do is send out large batches of emails with attachments.

 

I know that to include .xlsx files you need to add the line

content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" lrecl=32000

 to your attach= statement.

 

My question is, how do you send multiple attachments, of the same or different types, in one email? I have verified that each attachment works individually (I have six total attachments to send), but only the last one attached can be opened.

 

Thanks!

 

%macro emaildata (to_address, attachments);
 Filename output email;
 data _null_;
	file output
	to = (&to_address.)
	subject = "subject"
	attach = (&attachments. content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" lrecl=32000);

 put "text."; 

run;
%mend emaildata;

%emaildata (recipient, "&attachment1." "&attachment2." "&attachment3." "&attachment4." "&attachment5." "&attachment6.");
Ask a Question
Discussion stats
  • 0 replies
  • 98 views
  • 0 likes
  • 1 in conversation