- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear,
I am trying to configure Amazon Simple Email Service (SES) with SAS 9.4 to send email notifications and reports from SAS.
I have configured AWS SES but trying to find any sample code or SAS connect to configure in SAS.
Tried the following code but I am getting only the authentication error.
/*sample code*/
options emailsys=smtp;
options emailport=25;
options emailhost="email-smtp.amazon.com";
options emailid="test@domain.com";
options emailpw="******";
FILENAME Mailbox EMAIL 'test@domain.com'
Subject='Test Mail message';
DATA _NULL_;
FILE Mailbox;
PUT "Hello";
PUT "This is a Test email";
RUN;
ERROR: Email: 530 Authentication required
Thanks!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have referred this document - https://support.sas.com/kb/53/215.html
After applying this sample I can able to send email via AWS Simple Email Service (SES).
Sample Code:
options emailsys=smtp;
options emailhost=("email-smtp.amazonaws.com" STARTTLS auth=LOGIN id="SES-SMTP-USER_NAME" pw="SES-SMTP-PASSWORD" port=25);
filename outbox email from="email-congifured-in-ses@domain.com" ;
data _null_;
file outbox
to=("to@domain.com")
subject="My SAS Output"
;
put 'It worked great!';
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vivinkumar
Check this KB link on Troubleshooting guidelines for successfully sending an SMTP e-mail from SAS® software . It is to check if SMTP email is working successfully outside of SAS first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
When I try the telnet command I am getting the following response. Do I need to setup additional configuration for SMTP?
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-****** ###########
451 4.4.2 Timeout waiting for data from client.
Connection to host lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure if any config is required for SMTP, but here is a guide from AWS on troubleshooting timeout issues.
https://aws.amazon.com/premiumsupport/knowledge-center/smtp-connectivity-timeout-issues-ses/
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have retested the telnet command with additional parameters and I am getting the following authentication error.
220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-****** #######
helo domain.com
250 email-smtp.amazonaws.com
mail from: mail@domain.com
530 Authentication required
Still I am not clear what authentication and how to provide it.
Thanks
Vivin
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have referred this document - https://support.sas.com/kb/53/215.html
After applying this sample I can able to send email via AWS Simple Email Service (SES).
Sample Code:
options emailsys=smtp;
options emailhost=("email-smtp.amazonaws.com" STARTTLS auth=LOGIN id="SES-SMTP-USER_NAME" pw="SES-SMTP-PASSWORD" port=25);
filename outbox email from="email-congifured-in-ses@domain.com" ;
data _null_;
file outbox
to=("to@domain.com")
subject="My SAS Output"
;
put 'It worked great!';
run;