SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kareng
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Have you looked at the inlined option? Or at sending HTML? See here.

View solution in original post

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

Have you looked at the inlined option? Or at sending HTML? See here.

kareng
Calcite | Level 5

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.

kareng
Calcite | Level 5

SOLVED!

Using inlined, the ods html for the the body of the email as well as proc odstext, I got it figured out! 

ChrisNZ
Tourmaline | Level 20

Glad this was a useful solution.You could also insert <p> or <br> tags.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3534 views
  • 1 like
  • 2 in conversation