Hi,
After sas installation, I am trying to send an email for the first time. I have seen below code worked well in sas communities page.
options emailsys=SMTP emailhost=smtp.yourdomain.com emailport=yourport ;
FILENAME mail
EMAIL TO=("first.last@domain.com")
FROM="First Last<first.last@domain.com>"
SUBJECT="Subject header content here"
CONTENT_TYPE="text/html";
But, It neither given me error nor email.
2. I have tried below code.
options emailsys=smtp emailhost="<your.smtpemail.server.com>" emailport=25;
filename mymail email "<your.emailaddress.com>" subject="test message";
data _null_;
file mymail;
put 'Hello there';
run;
WARNING: Email: 550 Relat not permitted
WARNING: bad e-mail address
WARNING: No email addresses specified.
Anything blocking in my SMTP to send an email..?
The "relay not permitted" message can mean that your SAS server as such is completely blocked against sending mails, and/or that you try to send mails to an outside domain, which is (usually) only permitted for the internal client (e.g. the Exchange server). These measures are meant to block the abuse of SMTP servers for sending illicit mails.
Try with a destination address that is within the internal domain, and get into contact with your mail server admins.
The fact that you get this message at all means that your servername and port are correct.
OK. Does your SMTP server require authentication?
You need to get that information from whoever is responsible for administration of the mail server.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.