<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to send SAS email to multiple participants in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475420#M122250</link>
    <description>&lt;P&gt;I think your macro variable should contain a list of quoted mail adresses, e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let emails="A@sas.com" "B@sas.com";
TO=(&amp;amp;emails)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Jul 2018 11:43:26 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2018-07-04T11:43:26Z</dc:date>
    <item>
      <title>How to send SAS email to multiple participants</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475414#M122247</link>
      <description>&lt;P&gt;I've a macro variable as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let emails = "A@sas.com B@sas.com";&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options emailsys=smtp emailhost=domain.com  emailport=25; 
			filename outbox EMAIL;

			data _null_;
				
				file outbox
				TO=(&amp;amp;emails)
				FROM =('sas_noreply@domain.com') 
				type="text/html"
				subject=("SAS ALERT:");

				put '&amp;lt;html&amp;gt;';
				put '&amp;lt;body&amp;gt;';
				put '&amp;lt;div&amp;gt;';
				put '&amp;lt;p&amp;gt;Message Body&amp;lt;/p&amp;gt;
				put '&amp;lt;/div&amp;gt;';
				put '&amp;lt;/body&amp;gt;';
				put '&amp;lt;/html&amp;gt;';
			run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and I'm sending it using the upper code&lt;/P&gt;&lt;P&gt;I receive the error that email is bad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;"'a@sas.com' 'b@sas.com'"&lt;/P&gt;&lt;P&gt;"a@sas.om b@sas.com"&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;("a@sas.om b@sas.com")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kindly provide support.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please note, I've only a macro variable containing list of comma separated emails.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comma separated mails are working in "CC" but in "TO" system throws error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Email: 501 Syntax error, parameters in command "RCPT
       TO:&amp;lt;a@sas.com,b@sas.com&amp;gt;" unrecognized or missing
WARNING: Bad e-mail address: (a@sas.com,b@sas.com)
WARNING: No email addresses specified.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 11:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475414#M122247</guid>
      <dc:creator>Azeem112</dc:creator>
      <dc:date>2018-07-04T11:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to send SAS email to multiple participants</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475417#M122248</link>
      <description>&lt;P&gt;Just a tiny change in your %let:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let emails = "A@sas.com" "B@sas.com";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename outbox email
  to=(&amp;amp;emails)
  from =('sas_noreply@domain.com') 
  type="text/html"
  subject=("SAS ALERT:")
;

data _null_;
file outbox;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jul 2018 11:36:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475417#M122248</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-07-04T11:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to send SAS email to multiple participants</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475420#M122250</link>
      <description>&lt;P&gt;I think your macro variable should contain a list of quoted mail adresses, e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let emails="A@sas.com" "B@sas.com";
TO=(&amp;amp;emails)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jul 2018 11:43:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475420#M122250</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2018-07-04T11:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to send SAS email to multiple participants</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475422#M122251</link>
      <description>&lt;P&gt;Thanks a lot Everyone for Quick response. It's working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 11:55:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-SAS-email-to-multiple-participants/m-p/475422#M122251</guid>
      <dc:creator>Azeem112</dc:creator>
      <dc:date>2018-07-04T11:55:20Z</dc:date>
    </item>
  </channel>
</rss>

