BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BillJones
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
jakarman
Barite | Level 11

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

---->-- ja karman --<-----

View solution in original post

3 REPLIES 3
jakarman
Barite | Level 11

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

---->-- ja karman --<-----
BillJones
Calcite | Level 5

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.

jakarman
Barite | Level 11

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

---->-- ja karman --<-----

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 4878 views
  • 3 likes
  • 2 in conversation