DATA Step, Macro, Functions and more

email from SAS 9.4 Win7

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

email from SAS 9.4 Win7

The code:

 

filename mymail email "grezek@tcfbank.com"
   subject="log 3.2 done";

data _null_;
   file mymail;
   put 'program has finished code 3.2';
run;

 

will send a message:

 

sas email a program is trying to send an e-mail message on your behalf...

which require an "allow" or "deny" response.  How do I avoid this delay -- what parameter/option can I set to remove message?

Thanks in advance


Accepted Solutions
Solution
‎01-29-2018 12:44 PM
SAS Employee
Posts: 21

Re: email from SAS 9.4 Win7

Posted in reply to grezek_tcfbank_com

To bypass your local email client (i.e. Outlook) you can direct SAS to use SMTP: https://support.sas.com/kb/19/767.html

Your IT folks can help with the emailhost and port details.

View solution in original post


All Replies
Contributor
Posts: 30

Re: email from SAS 9.4 Win7

Posted in reply to grezek_tcfbank_com

Please look at the below link if you are using outlook.

https://kb.amicusattorney.com/articles/568-Outlook-Prompt-to-Deny-or-Allow-Access

Contributor
Posts: 22

Re: email from SAS 9.4 Win7

Posted in reply to againreddy

Thanks for the response.  I can't find Amicus on my machine and I've ask IT what we might have that functions similarly.  Thanks!

Solution
‎01-29-2018 12:44 PM
SAS Employee
Posts: 21

Re: email from SAS 9.4 Win7

Posted in reply to grezek_tcfbank_com

To bypass your local email client (i.e. Outlook) you can direct SAS to use SMTP: https://support.sas.com/kb/19/767.html

Your IT folks can help with the emailhost and port details.

Contributor
Posts: 22

Re: email from SAS 9.4 Win7

Posted in reply to DaveHorne

Thank you;  that works. 

 

Phillip Turner of SASTech Support came back with:

 

 

===SMTP port 25 with no authentication===

 

options emailsys=smtp;

options emailhost=smtp.mail.com;

options emailport=25;

options emailauthprotocol=NONE;

options emailid="email@mail.com";

filename myemail EMAIL DEBUG

from="sender@mail.com"

sender="sender@mail.com"

to="receiver@email.com"

subject="Test";

attach="C:\folder\attachment.file";

data _null_;

file myemail;

put "Hello";

run;

filename myemail clear;

 

which allowed me to email -- also a way to embed some of the commands in the sasv9.cfg

 

) Add the correct SMTP options after the last current line in your sasv9.cfg file. For example:

 

-EMAILSYS smtp

-EMAILHOST "email.server.com"

-EMAILPORT 25

-EMAILAUTHPROTOCOL none

-EMAILID "sender@email.com

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 148 views
  • 0 likes
  • 3 in conversation