<?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: Sending e-mail from SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122209#M25067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your code I see that you try to connect to GMAIL using the EMAILSYS=SMTP option. That does not work. GMAIL uses a secure link to connect to the mail server and that is not supported in the current release of the SMTP option. So you must use EMAILSYS=MAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However it is important that the EMAILID is exactly (case sensitive) as it is defined in the mail client that handles the MAPI calls. In GMAIL the EMAILID is normally the mail address, without the domain information. E.g. I used the email address &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:erik.t.sasgf2012@gmail.com"&gt;erik.t.sasgf2012@gmail.com&lt;/A&gt;&lt;SPAN&gt; for communications regarding SAS Global Forum 2012 and the login code for GMAIL was erik.t.sasgf2012. So that should be the value in the EMAILID option.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something similar applies when trying to send mails via Hotmail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2012 21:55:21 GMT</pubDate>
    <dc:creator>ErikT</dc:creator>
    <dc:date>2012-09-20T21:55:21Z</dc:date>
    <item>
      <title>Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122203#M25061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to have a SAS program send an e-mail.&amp;nbsp; We have SAS 9.3 running on Windows 7 professional but are still using Outlook 2007.&amp;nbsp; Has anyone done this successfully with a similar setup?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122203#M25061</guid>
      <dc:creator>NedK_PCH</dc:creator>
      <dc:date>2012-09-14T15:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122204#M25062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you had a chance to review previous postings regarding sending emails from SAS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/56047#56047"&gt;https://communities.sas.com/message/56047#56047&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/message/46554#46554"&gt;https://communities.sas.com/message/46554#46554&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 16:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122204#M25062</guid>
      <dc:creator>robby_beum</dc:creator>
      <dc:date>2012-09-14T16:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122205#M25063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robby,&lt;/P&gt;&lt;P&gt;Thanks for the direction.&amp;nbsp; I looked at the threads you mentioned.&amp;nbsp; In the first one, she says she put in the ip address of her mail system in the emailhost parameter but when I do that it only looks at the first 7 characters and treats the rest as an 'unrecognized option'&lt;/P&gt;&lt;P&gt;Other than that,not getting anywhere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 16:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122205#M25063</guid>
      <dc:creator>NedK_PCH</dc:creator>
      <dc:date>2012-09-14T16:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122206#M25064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be worth posting your code with the error message showing, then it might help someone identify the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question is have you ever managed to send email via SAS with a different set up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 16:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122206#M25064</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2012-09-14T16:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122207#M25065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I have tried it with emailsys SMTP with the following result:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;5980 %let hst = EXCHANGE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5981&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5982 options emailsys=SMTP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5983 options emaildlg=NATIVE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5984 options emailport=25;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5985 options emailauthprotocol=NONE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5986 options emailhost=&amp;amp;hst;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5987 options NOEMAILFROM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5988 options emailid="&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nkaufman@pch.com"&gt;nkaufman@pch.com&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5989 options emailpw=XXXXXXXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5990&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5991&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5992 filename outbox email "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nkaufman@pch.com"&gt;nkaufman@pch.com&lt;/A&gt;&lt;SPAN&gt;" debug;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5993&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5994 data _null_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5995 file outbox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5996 to=("&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nedkaufman@gmail.com"&gt;nedkaufman@gmail.com&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5997 /* Overrides value in filename statement */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5998 cc=("&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nedkaufman@gmail.com"&gt;nedkaufman@gmail.com&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5999 subject="My SAS Output"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6000 /* attach=("C:\sas\results.out" "C:\sas\code.sas")*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6001 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6002 put 'Folks,';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6003 put 'program ran';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6004 put 'It worked great!';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6005 run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The file OUTBOX is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E-Mail Access Device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S: HELO NKAUFMAN.classic.pchad.com&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Email: The software caused the connection to abort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;real time 2.16 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with emailsys MAPI&lt;/P&gt;&lt;P&gt;as follows:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;6006 %let hst = EXCHANGE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6007&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6008 options emailsys=MAPI;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6009 options emaildlg=NATIVE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6010 options emailport=25;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6011 options emailauthprotocol=NONE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6012 options emailhost=&amp;amp;hst;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6013 options NOEMAILFROM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6014 options emailid="&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nkaufman@pch.com"&gt;nkaufman@pch.com&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6015 options emailpw=XXXXXXXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6018 filename outbox email "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nkaufman@pch.com"&gt;nkaufman@pch.com&lt;/A&gt;&lt;SPAN&gt;" debug;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6020 data _null_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6021 file outbox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6022 to=("&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nedkaufman@gmail.com"&gt;nedkaufman@gmail.com&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6023 /* Overrides value in filename statement */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;6024 cc=("&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:nedkaufman@gmail.com"&gt;nedkaufman@gmail.com&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6025 subject="My SAS Output"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6026 /* attach=("C:\sas\results.out" "C:\sas\code.sas")*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6027 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6028 put 'Folks,';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6029 put 'program ran';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6030 put 'It worked great!';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6031 run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Undetermined I/O failure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;real time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 16:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122207#M25065</guid>
      <dc:creator>NedK_PCH</dc:creator>
      <dc:date>2012-09-14T16:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122208#M25066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before you define too many of the email options run...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc options group=email;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and check what's already defined for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code you call your email server just "EXCHANGE".&lt;/P&gt;&lt;P&gt;%let hst = EXCHANGE;&lt;/P&gt;&lt;P&gt;options emailhost=&amp;amp;hst;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shouldn't this be a fully qualified name like exchangexx.xxx.xxx.xxx (how is it called in the account settings of your Outlook client?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ERROR: Email: The software caused the connection to abort"&lt;/P&gt;&lt;P&gt;You get this error if some of your email settings are wrong (wrong server name, wrong port,...). port 25 is only the standard port. It can be different at your site.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2012 01:37:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122208#M25066</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2012-09-15T01:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sending e-mail from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122209#M25067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your code I see that you try to connect to GMAIL using the EMAILSYS=SMTP option. That does not work. GMAIL uses a secure link to connect to the mail server and that is not supported in the current release of the SMTP option. So you must use EMAILSYS=MAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However it is important that the EMAILID is exactly (case sensitive) as it is defined in the mail client that handles the MAPI calls. In GMAIL the EMAILID is normally the mail address, without the domain information. E.g. I used the email address &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:erik.t.sasgf2012@gmail.com"&gt;erik.t.sasgf2012@gmail.com&lt;/A&gt;&lt;SPAN&gt; for communications regarding SAS Global Forum 2012 and the login code for GMAIL was erik.t.sasgf2012. So that should be the value in the EMAILID option.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something similar applies when trying to send mails via Hotmail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2012 21:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sending-e-mail-from-SAS/m-p/122209#M25067</guid>
      <dc:creator>ErikT</dc:creator>
      <dc:date>2012-09-20T21:55:21Z</dc:date>
    </item>
  </channel>
</rss>

