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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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