/*mymail is [email protected] and i'm using SAs Eg thru server*/
filename mymail email "[email protected]" cc = ("[email protected]") 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 [email protected]
WARNING: Bad e-mail address: [email protected]
WARNING: Email: 550 5.7.1 Unable to relay for
WARNING: Bad e-mail address: [email protected]
2 The SAS System 03:34 Friday, February 10, 2017
WARNING: No email addresses specified.
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=("[email protected]")
FROM="First Last<[email protected]>"
SUBJECT="Subject header content here"
CONTENT_TYPE="text/html";
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=("[email protected]")
FROM="First Last<[email protected]>"
SUBJECT="Subject header content here"
CONTENT_TYPE="text/html";
thanks for replay Shark.
Hi Shark, this code is working fine:
/*"mymail" is Windows Authentication user name */
filename mymail email "[email protected]"/*To*/ cc = ("[email protected]")/* 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."
Hmm, I haven't used Windows authentication before but I code multiple email recipients this way,
EMAIL TO=("[email protected]","[email protected]","[email protected]","[email protected]")I've had up to 30+ email recipients this way. Hopefully that helps!
thanks Shark.
Now Multiple users option is working.
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →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.