Need to email a SAS graph such that the body of the email contains the graph. Using SAS 9.4 on Unix server. Any suggestions?
Why not attach the graph file (as jpg or other format) to the email
and have a notice to the attached file in the body ?
I am able to do that, however the requirement from the business partner is for the content to display in the body of the email.
This topic gets discussed a few times a year. Did you look at the suggestions in the thread "Embed an image in Outlook". It suggests using HTML. Also see "Embedded image in HTML email" for suggestions.
You can embed an image using the inlined= option when you attach the image to the email.
This gives the image a name you can use in HTML.
See this example from http://support.sas.com/documentation/cdl/en/lestmtsref/68024/HTML/default/viewer.htm#n0ig2krarrz6vtn...
options emailsys=smtp;
filename myemail email
to="Jim@acme.com"
from="Wiley <wcoyote@acme.com>"
sender="Wiley <wcoyote@sas.com>"
attach=('C:\Public\Pictures\Sample Pictures\sasLogo.gif' NAME="sasLogo" INLINED="logo"
'C:\temp\reportToEmail.html' NAME='myreport')
subject="Embedded Image Example"
content_type="text/html";
data _null_;
file myemail;
put 'Dear customer,<br><br>';
put 'This is an example email with content type text/html, an attached report ';
put 'and an embedded image.<br><br>';
put 'Sincerely,<br><br>';
put 'Wiley Coyote<br>';
put 'Developer<br>';
put 'SAS Research & Development<br>';
put '1234 Any Street<br> ';
put 'Sampletown';
put 'NC 45678<br><br><br>';
put '<IMG src="cid:logo" height="40" width="160">';
run;
Here's another example that might help...
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.