BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
claridad123
Fluorite | Level 6
I would like to send the email to multiple user, while one email address has a single quote in it: M'ma.E.Smith@gmail.com. Put double quote like M''am.E.Smith@gmail.com does not work.
Much appreciated the help!

%let email_out='Adam.X.Smith@gmail.com'
'Barbara.C.Smith@gmail.com'
'Cyndi.D.Smith@gmail.com'
'M''ma.E.Smith@gmail.com');

filename mymail email
subject="Automated Report: Test"
TYPE='text/html';

data _null_;
file mymail
from=('Test@gmail.com')
to=( &email_out);
put 'Test Program';
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
claridad123
Fluorite | Level 6
Using %quote("M'ma.E.Smith@gmail.com") and problem solved

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

... does not work


You have a parenthesis at the end of the value of macro variable &email_out, which won't work. What happens after you remove the parenthesis?

 

When code doesn't work, show us the LOG, all of the LOG for this portion of code, every single line in the LOG for this portion of code. Do not chop parts of out the LOG for this portion of code.

 

 

--
Paige Miller
claridad123
Fluorite | Level 6
Using %quote("M'ma.E.Smith@gmail.com") and problem solved

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 1433 views
  • 0 likes
  • 2 in conversation