I have a macro to send a batch of customized email messages with a unique multi-page PDF attachment. The email itself is currently plain text (functioning code is below.) My customer has now requested the email include their graphic signature file at the end of the email. Presently, the file is .jpg but can be saved as other format as well. I have found papers on embedding graphics/images into a file and sending the file as an attachment, not embedding the image into the email body.
Data _NULL_;
filename mymail email from="sender@domain.org"
TO = (&rpt_email_em. )
Readreceipt
SUBJECT = "Important information in advance of the upcoming meeting"
ATTACH = ( "&rpt_path_em." content_type="application/pdf")
;
run;
data _null_;
file mymail;
put "Attention &full_name_em.:";
put "text statement 1" ;
put "text statement 2.";
put;
run;
Have you looked at the inlined option? Or at sending HTML? See here.
Have you looked at the inlined option? Or at sending HTML? See here.
Yes, I did & thanks for your reply. Using inlined on an HTML email includes the image file, and it introduces other issues because all the text of the email message, including the greeting and two text paragraphs become strung together without any breaks.
SOLVED!
Using inlined, the ods html for the the body of the email as well as proc odstext, I got it figured out!
Glad this was a useful solution.You could also insert <p> or <br> tags.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.