Hello,
I'm trying to send email from a data step using SAS 9.3. I believe that I can configure my email client in an options statement. However, when I do so and attempt to send myself a test email, I get the following error message: "ERROR: Email: The connection was reset by a peer." Note I'm running Windows 7 (64 bit) and want to send the email using the smtp protocol. Here's my code:
options emailsys=smtp emailid="xxxxxxx@sbcglobal.net" emailpw="xxxxxxx" emailhost=outbound.att.net emailport=465;
filename mymail email "xxxxxxx@sbcglobal.net" subject="test message" lrecl=256;
data _null_;
file mymail;
put 'hello there';
run;
Are there any errors in the above? Also, here's the link to the ATT smtp settings. At the top of the page they state that if you setup your email account after June 2011 you can't use an email client. I setup my account several years ago, so I don't think that's the issue.
Email server settings (POP and SMTP) - AT&T DSL High Speed Support
Any help or advice would be greatly appreciated! Thank you!
-Bill
Billd, Could be with 9.4. You also are getting SAS/secure with that, no dedicated license anymore.
SAS(R) 9.4 System Options: Reference (EMAILHOST= System Option) ssl is mentioned
See:
Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia The SMTP protocol is missing by design login and encryption.
AT&T is mentioning secured SMTP (SSL) something we are missing at SAS docs
SAS(R) 9.4 System Options: Reference (EMAILAUTHPROTOCOL= System Option) may be this one is missing.
An other is that SMTP is well known to send mail MAPI also a good approach is the default protoc at Windows
SAS(R) 9.4 Companion for Windows (EMAILSYS System Option: Windows)
Some sample/notes
http://support.sas.com/resources/papers/proceedings13/023-2013.pdf
Jaap - Thanks for the references. Much appreciated
I was able to send an email with SAS! Out of frustration I went through all the web email accounts that I have and surprisingly the only that worked was AOL. Here's the code that I used:
options emailsys=smtp emailauthprotocol=login emailid="xxxxx@aol.com" emailpw="xxxxxx" emailhost=smtp.aol.com emailport=587;
filename mymail email "xxxxxx@sbcglobal.net" subject="Test" lrecl=256;
data _null_;
file mymail;
put 'Hello!';
run;
Note I tried to use code above to send email from my sbcglobal (ATT) account. Tried all sorts of server/port combinations as well as specifying emailauthprotocol = login and plain. Nothing worked. This is probably because as Jaap pointed out (thanks again) ATT requires SSL. Therefore, I believe my SAS code was fine. It doesn't seem possible to send email with ATT right now. Perhaps in SAS 9.4, we'll be able to send email the SSL protocol.
Billd, Could be with 9.4. You also are getting SAS/secure with that, no dedicated license anymore.
SAS(R) 9.4 System Options: Reference (EMAILHOST= System Option) ssl is mentioned
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.