Apologies, somehow I dropped that ; when copying the code over, that doesn't seem to be the issue. Here is the log for the code (updated to test with actual email): 1 The SAS System 12:13 Friday, July 28, 2023 1 %_eg_hidenotesandsource; 5 %_eg_hidenotesandsource; 33 34 data work.class (label='Student Data'); 35 infile datalines dsd dlm='|' truncover; 36 input Name :$8. Sex :$1. Age Height Weight ; 37 datalines4; NOTE: The data set WORK.CLASS has 19 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 57 ;;;; 58 59 %let workdir=%trim(%sysfunc(pathname(work))); 60 ods _ALL_ close; 61 ods listing gpath="&workdir"; 62 ods graphics / reset=index outputfmt=PNG imagename='email'; 63 *title1 'Graph output emailed using SAS'; 64 proc sgplot data=work.class noautolegend; 65 bubble x=weight y=height size=age; 66 run; NOTE: PROCEDURE SGPLOT used (Total process time): real time 0.22 seconds cpu time 0.07 seconds NOTE: Listing image output written to D:\saswork\hartsough-lauren\_TD29132_S16ZAPAP02895_\Prc2\email.png. NOTE: There were 19 observations read from the data set WORK.CLASS. 67 68 filename sendmail email to=("hartsough-lauren@norc.org") from=("hartsough-lauren@norc.org") 69 attach=("&workdir./email.png" inlined='sgplot') 70 type='text/html' subject="Emailing graphics output"; 71 data _null_; 72 file sendmail; 73 put '<html>'; 74 put '<body>'; 75 put '<img src=cid:sgplot>'; 76 put '</body>'; 77 put '</html>'; 78 run; NOTE: The file SENDMAIL is: E-Mail Access Device Message sent To: "hartsough-lauren@norc.org" Cc: Bcc: Subject: Emailing graphics output Attachments: ( "D:\saswork\hartsough-lauren\_TD29132_S16ZAPAP02895_\Prc2/email.png" INLINED = 'sgplot' ) NOTE: 5 records were written to the file SENDMAIL. The minimum record length was 6. The maximum record length was 20. NOTE: DATA statement used (Total process time): 2 The SAS System 12:13 Friday, July 28, 2023 real time 0.13 seconds cpu time 0.00 seconds 79 filename sendmail clear; NOTE: Fileref SENDMAIL has been deassigned. 80 81 %_eg_hidenotesandsource; 95 96 97 %_eg_hidenotesandsource; 100
... View more