Hi, I have a piece of code that used to send email to my boss regading some stats, now it stopped working due to 'Permission is denied'. I checked software status it will not expire till end of 2017. So could someone help me on this?
Expiration: 30DEC2017.
Grace Period: 45 days (ending 13FEB2018).
Warning Period: 47 days (ending 01APR2018).
System birthday: 28MAR2017.
Operating System: WX64_WKS.
Product expiration dates:
---Base SAS Software
30DEC2017
---SAS/STAT
30DEC2017
---SAS/GRAPH
30DEC2017
---SAS/IML
30DEC2017
---SAS/Secure 168-bit
30DEC2017
---SAS/Secure Windows
30DEC2017
---SAS Enterprise Guide
30DEC2017
---SAS/ACCESS Interface to PC Files
30JAN2017
---SAS/ACCESS Interface to ODBC
30DEC2017
---SAS/IML Studio
30DEC2017
---SAS Workspace Server for Local Access
30DEC2017
---High Performance Suite
30DEC2017
the piece of SAS code:
options noxwait
EMAILSYS=SMTP
EMAILHOST='XXXXX'
EMAILPORT=25;run;
%let start_time=%sysfunc(putn(%sysfunc(datetime()),datetime22.));
%let emailsaserrors="XXXXXXXXXXXXXXXXX";
/* E-mail tables in HTML format */
FILENAME output EMAIL
SUBJECT= " Completed for %sysfunc(date(),yymmdd10.)"
FROM= "XXXXXXX"
TO= (&emailsaserrors.) CT= "text/html" /* Required for HTML output */ ;
ODS HTML BODY=output STYLE=sasweb;
ods html text="<p align=center><b><h2>Process finished. Results are as below</h2></b></p><br><hr>";
TITLE JUSTIFY=left
"Summary";
proc print data=Overall noobs;
run;
ODS HTML CLOSE;
I couldn't reproduce the error you were getting.
As long as I use a valid FROM and TO email address, your code worked on my system (after creating a dataset named "overall").
Maybe you can rerun and show the log section with the error (delete any email addresses)?
Hi, I was receiving the exact same message. In my case, the problem was that I was using the wrong emailsys (smtp). I changed it to mapi and it solved the problem. Make sure you are using the correct email system. Hope this helps.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.