01-15-2018 11:00 AM
I'm tryig to send an email directly froam SAS, but the system give me this message "ERROR: Email: Permission is denied."
I'm using this code:
filename mymail email "ABC@servidor.pt" subject="Relatório P348" from="ABC@servidor.pt" to="ABC@servidor.pt" attach="C:\Users\......\Abc.xlsx"; data _null_; file mymail; put Texto"; put "Texto."; run;
I've already run this command:
proc setinit; run;
And I've obtained this message:
Operating System: WX64_SV .
Product expiration dates:
---Base SAS Software 29JUN2018
---SAS Integration Technologies 29JUN2018
---SAS/Secure 168-bit 29JUN2018
---SAS/Secure Windows 29JUN2018
---SAS Enterprise Guide 29JUN2018
---SAS/ACCESS Interface to PC Files 29JUN2018
---SAS/ACCESS Interface to ODBC 29JUN2018
---SAS Workspace Server for Local Access 29JUN2018
---High Performance Suite 29JUN2018
---SAS Add-in for Microsoft Excel 29JUN2018
---SAS Add-in for Microsoft Outlook 29JUN2018
---SAS Add-in for Microsoft PowerPoint 29JUN2018
---SAS Add-in for Microsoft Word 29JUN2018
What am I doing wrong?
Can anyone help me?
01-15-2018 11:59 AM
Do it work without the attachment ?
First, are you able to send email outside of SAS?
Please use Usage Note 18363 (Troubleshooting guidelines for successfully sending an SMTP e-mail from SAS® software) and let us know if that works.
Then try to apply this one Usage Note 19767 (Using SAS® software to send SMTP email).
It tells you the option you need to setup, etc. and gives you a sampel code.
Ovreall, Sending E-mail from the DATA step should help you if you can get the above 2 Notes to work.
Hope that helps.
01-22-2018 04:48 AM
No. Now I don't have any problem sending de e-mail from data step. It's working perfetly.
But I can't send the email with the code I write above. Do you have any idea to solve the problem? (it is no very importante... just curiosity).
Thank you again.
01-22-2018 04:52 AM
Great, so you have a solution, that's the main point.
Can you send us the 2 logs files (when it works and the one related to your original program) ?