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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.