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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.