06-21-2017 01:03 PM - edited 06-21-2017 01:24 PM
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
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.
%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.");