BookmarkSubscribeRSS Feed
PMNMatos
Calcite | Level 5

Hello,

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/STAT 29JUN2018
---SAS/GRAPH 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?

5 REPLIES 5
Damo
SAS Employee

Hi @PMNMatos

 

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.

 

Cheers,
Damo

PMNMatos
Calcite | Level 5

Hi,

 

Now I can send an e-mail from the DATA step.

I continue to have some issues with the program.

 

Thank you for your help.

 

Damo
SAS Employee

Hi @PMNMatos

 

Can't you use the DATA step to send email then?

What is your constraint?

 

Cheers,
Damo

PMNMatos
Calcite | Level 5

Hi Damo,

 

 

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.

 

Pedro 

Damo
SAS Employee

Hi @PMNMatos

 

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) ?

 

Cheers,
Damien

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3082 views
  • 0 likes
  • 2 in conversation