Data visualization with SAS programming

Display SAS Graph in Body of Email

Reply
New Contributor meb
New Contributor
Posts: 3

Display SAS Graph in Body of Email

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?

Super User
Posts: 1,078

Re: Display SAS Graph in Body of Email

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 ?

New Contributor meb
New Contributor
Posts: 3

Re: Display SAS Graph in Body of Email

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.

SAS Super FREQ
Posts: 3,232

Re: Display SAS Graph in Body of 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.   

Learner
Posts: 1

Re: Display SAS Graph in Body of Email

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;

SAS Employee
Posts: 963

Re: Display SAS Graph in Body of Email

Post a Question
Discussion Stats
  • 5 replies
  • 301 views
  • 0 likes
  • 5 in conversation