<?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 How to send emails from SAS using SAS Studio online in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297615#M1096</link>
    <description>&lt;P&gt;I&amp;nbsp;created an account&amp;nbsp;for Online SAS Studio using&amp;nbsp;&lt;A href="https://odamid.oda.sas.com/SASStudio/" target="_blank"&gt;https://odamid.oda.sas.com/SASStudio/&lt;/A&gt;&amp;nbsp; for practicing my SAS skills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following Chris Hemedinger blog (&lt;A href="http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/&lt;/A&gt;), I tried to implement the learning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I intend to send email TO gmail, for which if I use following lines and it works like a charm (read on to get to know the problem)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename myemail EMAIL&lt;BR /&gt;&amp;nbsp; to="myuserid@gmail.com"&amp;nbsp;&lt;BR /&gt;&amp;nbsp;subject="Hi";&lt;BR /&gt;&amp;nbsp;data _null_;&lt;BR /&gt;&amp;nbsp; file myemail;&lt;BR /&gt;&amp;nbsp; put "Hello&amp;nbsp;Friend";&lt;BR /&gt;run;&lt;BR /&gt;filename myemail clear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I use below lines of code on top of that, it errors out,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options emailhost=&lt;BR /&gt;&amp;nbsp;(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "smtp.gmail.com" port=587&lt;BR /&gt;&amp;nbsp;&amp;nbsp; STARTTLS auth=plain&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; id="&amp;lt;my-gmail-userid&amp;gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; /*pw="my-gmail-password" */&lt;BR /&gt;&amp;nbsp;)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically it's erroring out when I am trying to use GMAIL as a SENDER.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already done the following :-&lt;/P&gt;&lt;P&gt;a) Enabled "Less secure apps" on&amp;nbsp;my Gmail account in order to send e-mail from a non-Google application (including SAS).&lt;/P&gt;&lt;P&gt;b)&amp;nbsp;Tried port 587, and STARTTLS instead of SSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what the log looks like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The file MYEMAIL is:&lt;/P&gt;&lt;DIV class="sasNote"&gt;E-Mail Access Device&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Email: 535-5.7.8 Username and Password not accepted. Learn more at&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Email: 535 5.7.8 &lt;A href="https://support.google.com/mail/?p=BadCredentials" target="_blank"&gt;https://support.google.com/mail/?p=BadCredentials&lt;/A&gt; y3sm19145222pfy.36 - gsmtp&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 1.60 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.04 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 2265.09k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 29088.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 09/11/2016 07:32:21 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 14 Switch Count 65&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 1277&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 236&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 1&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Do&amp;nbsp;the experts here have any help to offer? Please advise.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Regards,&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Arpit&lt;/DIV&gt;</description>
    <pubDate>Sun, 11 Sep 2016 19:35:30 GMT</pubDate>
    <dc:creator>Arpit_Agarwal</dc:creator>
    <dc:date>2016-09-11T19:35:30Z</dc:date>
    <item>
      <title>How to send emails from SAS using SAS Studio online</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297615#M1096</link>
      <description>&lt;P&gt;I&amp;nbsp;created an account&amp;nbsp;for Online SAS Studio using&amp;nbsp;&lt;A href="https://odamid.oda.sas.com/SASStudio/" target="_blank"&gt;https://odamid.oda.sas.com/SASStudio/&lt;/A&gt;&amp;nbsp; for practicing my SAS skills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following Chris Hemedinger blog (&lt;A href="http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/&lt;/A&gt;), I tried to implement the learning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I intend to send email TO gmail, for which if I use following lines and it works like a charm (read on to get to know the problem)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename myemail EMAIL&lt;BR /&gt;&amp;nbsp; to="myuserid@gmail.com"&amp;nbsp;&lt;BR /&gt;&amp;nbsp;subject="Hi";&lt;BR /&gt;&amp;nbsp;data _null_;&lt;BR /&gt;&amp;nbsp; file myemail;&lt;BR /&gt;&amp;nbsp; put "Hello&amp;nbsp;Friend";&lt;BR /&gt;run;&lt;BR /&gt;filename myemail clear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I use below lines of code on top of that, it errors out,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options emailhost=&lt;BR /&gt;&amp;nbsp;(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; "smtp.gmail.com" port=587&lt;BR /&gt;&amp;nbsp;&amp;nbsp; STARTTLS auth=plain&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; id="&amp;lt;my-gmail-userid&amp;gt;"&lt;BR /&gt;&amp;nbsp;&amp;nbsp; /*pw="my-gmail-password" */&lt;BR /&gt;&amp;nbsp;)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically it's erroring out when I am trying to use GMAIL as a SENDER.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already done the following :-&lt;/P&gt;&lt;P&gt;a) Enabled "Less secure apps" on&amp;nbsp;my Gmail account in order to send e-mail from a non-Google application (including SAS).&lt;/P&gt;&lt;P&gt;b)&amp;nbsp;Tried port 587, and STARTTLS instead of SSL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what the log looks like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The file MYEMAIL is:&lt;/P&gt;&lt;DIV class="sasNote"&gt;E-Mail Access Device&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Email: 535-5.7.8 Username and Password not accepted. Learn more at&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Email: 535 5.7.8 &lt;A href="https://support.google.com/mail/?p=BadCredentials" target="_blank"&gt;https://support.google.com/mail/?p=BadCredentials&lt;/A&gt; y3sm19145222pfy.36 - gsmtp&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 1.60 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;user cpu time 0.04 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;system cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;memory 2265.09k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;OS Memory 29088.00k&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Timestamp 09/11/2016 07:32:21 PM&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Step Count 14 Switch Count 65&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Faults 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Reclaims 1277&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Page Swaps 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Voluntary Context Switches 236&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Involuntary Context Switches 1&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Input Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Block Output Operations 0&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Do&amp;nbsp;the experts here have any help to offer? Please advise.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Regards,&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Arpit&lt;/DIV&gt;</description>
      <pubDate>Sun, 11 Sep 2016 19:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297615#M1096</guid>
      <dc:creator>Arpit_Agarwal</dc:creator>
      <dc:date>2016-09-11T19:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to send emails from SAS using SAS Studio online</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297617#M1097</link>
      <description>&lt;P&gt;Not likely.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To send email you need access to an email server and the online version won't have it. But you know it's possible if you ever do need to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember that these are learning editions, not full editions of SAS.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2016 20:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297617#M1097</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-11T20:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to send emails from SAS using SAS Studio online</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297626#M1099</link>
      <description>Hi:&lt;BR /&gt;  And, in addition to Reeza's reasons for why it isn't likely, another reason why it isn't likely is that in order to send email from a SAS program, there MUST be SAS e-mail options turned on when SAS starts up. And, since you do not have permission to alter the SAS start-up file, it is unlikely that this will work for you. Although, it IS possible to send email from SAS, once you are on a full system, where you can ask you administrators to implement the options you need to make it work.&lt;BR /&gt; &lt;BR /&gt;cynthia</description>
      <pubDate>Sun, 11 Sep 2016 21:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/297626#M1099</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-09-11T21:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to send emails from SAS using SAS Studio online</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/298848#M1130</link>
      <description>Ok, thanks!</description>
      <pubDate>Fri, 16 Sep 2016 03:40:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/298848#M1130</guid>
      <dc:creator>Arpit_Agarwal</dc:creator>
      <dc:date>2016-09-16T03:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to send emails from SAS using SAS Studio online</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/298849#M1131</link>
      <description>Thank you for your advice!</description>
      <pubDate>Fri, 16 Sep 2016 03:41:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-send-emails-from-SAS-using-SAS-Studio-online/m-p/298849#M1131</guid>
      <dc:creator>Arpit_Agarwal</dc:creator>
      <dc:date>2016-09-16T03:41:54Z</dc:date>
    </item>
  </channel>
</rss>

