BookmarkSubscribeRSS Feed
pessi
Obsidian | Level 7

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..?

5 REPLIES 5
Kurt_Bremser
Super User

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.

pessi
Obsidian | Level 7
I am sending email to internal only. SMTP domain and my email both belongs to same domain.
pessi
Obsidian | Level 7
i am not aware of that. Do I need to check with Network Admin? or is there any way to check by me?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1366 views
  • 0 likes
  • 2 in conversation