<?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 email from SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743696#M232895</link>
    <description>&lt;P&gt;I'm running the code from&amp;nbsp;SAS Data Integration Studio 4.904. Sas version is 9.4 and the platform is Linux 3.10.0-957.21.3.el7.x86_64 (LIN X64). Also I tried to do it from SAS EG 8.1 but got the same "Connection refused" error. So I guess the deal is with server options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please provide me with your&amp;nbsp;&lt;EM&gt;proc options group=email&lt;/EM&gt;&amp;nbsp;output?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 20:42:16 GMT</pubDate>
    <dc:creator>sonofendor</dc:creator>
    <dc:date>2021-05-25T20:42:16Z</dc:date>
    <item>
      <title>How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743527#M232815</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to send an email from our SAS server. I tried to do it like it's written in &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hosto390/p0kgzksjepofk2n15jlvg9yd8a5r.htm" target="_self"&gt;documentation&lt;/A&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename myemail EMAIL
  to=/*here is my personal email*/
  subject="Testing email connection";

data _null_;
	file	myemail;
	put	'Test...';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got the error "ERROR: Email: The connection was refused."&lt;/P&gt;&lt;P&gt;Then I read &lt;A href="https://blogs.sas.com/content/sasdummy/2013/07/31/gmail-from-sas-program/" target="_self"&gt;this&lt;/A&gt; and tried to send an email from my own gmail mailbox:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options emailhost=
 (
   "smtp.gmail.com" 
   port=587 STARTTLS 
   auth=plain 
   id=/*my email*/
   pw=/*my password*/
 )
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got other error "ERROR: Unable to create cipher."&lt;/P&gt;&lt;P&gt;The default email options are:&lt;/P&gt;&lt;PRE&gt; EMAILACKWAIT=30  
 EMAILAUTHPROTOCOL=NONE
 NOEMAILFROM      
 EMAILHOST=/* our hostname */
 EMAILID=          
 EMAILPORT=25      
 EMAILPW=XXXXXXXX  
 EMAILUTCOFFSET=   
 EMAILSYS=SMTP &lt;/PRE&gt;&lt;P&gt;How do I send emails from SAS code? Or how do I check if it's even possible on our server?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your replies&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 12:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743527#M232815</guid>
      <dc:creator>sonofendor</dc:creator>
      <dc:date>2021-05-25T12:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743582#M232837</link>
      <description>&lt;P&gt;1. Your first code should work. What environment (your SAS install) are you using.&lt;BR /&gt;I tested with SAS OnDemand for Academics and it works flawlessly.&lt;BR /&gt;2.About using Gmail, access to less secure apps needs to be enabled in gmail.&lt;BR /&gt;This information is available in your reference.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 15:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743582#M232837</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-25T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743696#M232895</link>
      <description>&lt;P&gt;I'm running the code from&amp;nbsp;SAS Data Integration Studio 4.904. Sas version is 9.4 and the platform is Linux 3.10.0-957.21.3.el7.x86_64 (LIN X64). Also I tried to do it from SAS EG 8.1 but got the same "Connection refused" error. So I guess the deal is with server options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please provide me with your&amp;nbsp;&lt;EM&gt;proc options group=email&lt;/EM&gt;&amp;nbsp;output?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 20:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743696#M232895</guid>
      <dc:creator>sonofendor</dc:creator>
      <dc:date>2021-05-25T20:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743701#M232900</link>
      <description>&lt;P&gt;Your first set of code should work.&amp;nbsp; You might have to talk to your email administration team.&amp;nbsp; The "Connection Refused" message sounds like a setting that your company has put in place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second set of code might be blocked by a firewall, I'm not sure. I doubt most companies would leave the ports open, but it depends on your company.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 21:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743701#M232900</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-05-25T21:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743704#M232902</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/335748"&gt;@sonofendor&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please have a look at this&amp;nbsp;&lt;A href="https://support.sas.com/kb/19/767.html" target="_blank"&gt;https://support.sas.com/kb/19/767.html&lt;/A&gt;.. This guides about the SAS side including the options. These are typically set when the SAS server is installed.&lt;BR /&gt;It is possible that your organization has a policy that regulates email services. Do check with your administrators.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 21:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743704#M232902</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-25T21:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743705#M232903</link>
      <description>&lt;P&gt;Check with your SAS administrator for the correct settings in your code. He/she should know this. If you already using the right approach, then he/she should be able to sort problems with port firewall rules etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 21:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743705#M232903</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-25T21:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743706#M232904</link>
      <description>You can only send mail if the SAS system administrator has set up and authorized email capabilities for you.   This will be done by adjusting the firewall to allow connection to the emailport (25) on the email host from the SAS server.   Connection refused generally means that one of the email settings is incorrect, or the firewall is blocking the connection.  &lt;BR /&gt;</description>
      <pubDate>Tue, 25 May 2021 21:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/743706#M232904</guid>
      <dc:creator>DavePrinsloo</dc:creator>
      <dc:date>2021-05-25T21:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/744466#M233235</link>
      <description>&lt;P&gt;Thank you all for you replies! So I have talked with administrators and it turned out that they don't want to allow sending emails from our server&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt; Once again thanks to everyone for the replies!&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 16:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/744466#M233235</guid>
      <dc:creator>sonofendor</dc:creator>
      <dc:date>2021-05-28T16:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to send email from SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/744553#M233264</link>
      <description>&lt;P&gt;Please mark your post as answered then.&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 22:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-send-email-from-SAS/m-p/744553#M233264</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-28T22:29:57Z</dc:date>
    </item>
  </channel>
</rss>

