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!
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;
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.
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/
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;
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!
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.