<?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 emails with attachment from sas in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359848#M84650</link>
    <description>&lt;P&gt;I believe the below article will be helpful for your requirement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 23:20:49 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2017-05-18T23:20:49Z</dc:date>
    <item>
      <title>sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359846#M84649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;we use ms outlook 2016 and can you please advise how to send an email to&amp;nbsp;multiple recepients A) with an attachment file and B) short header and body of the email.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my attachment is saved on the C drive&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 23:15:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359846#M84649</guid>
      <dc:creator>tparvaiz</dc:creator>
      <dc:date>2017-05-18T23:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359848#M84650</link>
      <description>&lt;P&gt;I believe the below article will be helpful for your requirement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/038-2008.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 23:20:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359848#M84650</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-05-18T23:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359851#M84652</link>
      <description>&lt;P&gt;Does SAS run on your PC? If so you will be able to pick up local drive attachments. You also need access to an email gateway - an SMTP one in your case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are using SAS on a server it would need to be configured to use an SMTP gateway and your attachments would have to be accessible from your server.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 23:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359851#M84652</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-05-18T23:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359892#M84659</link>
      <description>&lt;P&gt;And how are you using SAS?&lt;/P&gt;
&lt;P&gt;- Locally with native Display Manager?&lt;/P&gt;
&lt;P&gt;- Locally, but through Enterprise Guide?&lt;/P&gt;
&lt;P&gt;- Remotely on a server? If yes, please specify:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; - the server's operating system&lt;/P&gt;
&lt;P&gt;&amp;nbsp; - SAS Studio or Enterprise Guide?&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 07:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/359892#M84659</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-19T07:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360160#M84739</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using code that looks like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let label = &amp;amp;date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt; file cmds;&lt;BR /&gt; put "[save.as(%bquote("&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;SPAN&gt;:\Weekly\File&lt;/SPAN&gt;&amp;nbsp;&amp;amp;label..xlsx"))]";&lt;BR /&gt;put '[CLOSE()]';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FILENAME Mailbox EMAIL 'temp@microsoft.com'&lt;BR /&gt; Subject='Test Mail message' ATTACH='X:\Weekly\File May 2017.xls';&lt;BR /&gt;DATA _NULL_;&lt;BR /&gt;FILE Mailbox;&lt;BR /&gt;PUT "Hello";&lt;BR /&gt;PUT "Plesae find Report as an attachment";&lt;BR /&gt;PUT "Thank you";&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Question: as you can see, when I save my excel file it's using a variable/date as part of the file name but when I am referencing the attachment it's taking constant file name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;how can I customize it to use variable file name when sending an email attachment, something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ATTACH='&lt;/SPAN&gt;&lt;SPAN&gt;X&lt;/SPAN&gt;&lt;SPAN&gt;:\Weekly\File&amp;nbsp;&amp;amp;label..xlsx&lt;/SPAN&gt;&lt;SPAN&gt;';&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 May 2017 01:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360160#M84739</guid>
      <dc:creator>tparvaiz</dc:creator>
      <dc:date>2017-05-20T01:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360165#M84742</link>
      <description>when you mention macro variables you have to use double quotes&lt;BR /&gt;&lt;BR /&gt;You can try below&lt;BR /&gt;&lt;BR /&gt;ATTACH="X:\Weekly\File &amp;amp;label..xls";</description>
      <pubDate>Sat, 20 May 2017 02:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360165#M84742</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-05-20T02:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: sending emails with attachment from sas</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360941#M85050</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 21:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sending-emails-with-attachment-from-sas/m-p/360941#M85050</guid>
      <dc:creator>tparvaiz</dc:creator>
      <dc:date>2017-05-23T21:57:11Z</dc:date>
    </item>
  </channel>
</rss>

