BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sivastat08
Pyrite | Level 9
/*mymail is siva.sivaraj@aighealth.com and i'm using SAs Eg thru server*/
filename mymail email "akash.sha@aighealth.com" cc = ("shant.guptil@aighealth.com") subject="Hi Team" lrecl=256 type="TEXT/HTML";
ods _ALL_ CLOSE;
ods html3 body=mymail style=sasweb;
options nocenter;
title;
data _null_;
file print;
	put "Hi shanth,";
	put "welcome to SAS World";
	put "Thanks";
run; 

 hi there i need help on above code after running this code im getting waning as 

 hi there, I need help on above code after running this code I’m getting waning as 

WARNING: Email: 550 5.7.1 Unable to relay for shant.guptil@aighealth.com

WARNING: Bad e-mail address: shant.guptil@aighealth.com

WARNING: Email: 550 5.7.1 Unable to relay for

akash.sha@aighealth.com

WARNING: Bad e-mail address: akash.sha@aighealth.com

2 The SAS System                                                                                     03:34 Friday, February 10, 2017

 

WARNING: No email addresses specified.

1 ACCEPTED SOLUTION

Accepted Solutions
TheShark
Obsidian | Level 7

Syntax looks to be a little off, should be something like this...

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";

View solution in original post

5 REPLIES 5
TheShark
Obsidian | Level 7

Syntax looks to be a little off, should be something like this...

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";
sivastat08
Pyrite | Level 9

thanks for replay Shark.

sivastat08
Pyrite | Level 9

Hi Shark, this code is working fine:

 

/*"mymail" is Windows Authentication user name */

 

filename mymail email "Firstname.Lastname@domain.com"/*To*/ cc = ("Firstname.Lastname@domain.com")/* CC*/ subject="Hi Team" lrecl=256 type="TEXT/HTML";
ods _ALL_ CLOSE;
ods html3 body=mymail style=sasweb;
options nocenter;
title;
data _null_;
file print;
put "Hi There";
put "welcome to SAS World";
put "Thanks";
run;

 

 

But if i try to send email to multiple users its throwing Error. Could you please help on this…"ERROR: No logical assign for filename MYMAIL."

TheShark
Obsidian | Level 7

Hmm, I haven't used Windows authentication before but I code multiple email recipients this way,

 

 EMAIL TO=("email@domain.com","emailTWO@domain.com","emailTHREE@domain.com","emailFOUR@domain.com")

I've had up to 30+ email recipients this way. Hopefully that helps!

sivastat08
Pyrite | Level 9

thanks Shark.

Now Multiple users option is working.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 8025 views
  • 5 likes
  • 2 in conversation