<?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 Send Email with results attached as PDF in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389768#M93469</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below code which looks at exporting the datasets. However, I'd like the email to have the HTML results attached as a PDF instead - any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let user = crf;
%let dataset=CIRC;
%let dataset1=/user/&amp;amp;user/CIRC.csv;

Data &amp;amp;dataset;
set CIRC;
run;
proc export data=&amp;amp;dataset
   outfile="&amp;amp;dataset1"
   dbms=csv
   replace; 
   run;

***update email recipients here***;
filename mymail email 
   To=("cameron.test@test.com" )
   subject="Circulation Report -  Prev 90 days"
   attach=("&amp;amp;dataset1");

data _null_;
   file mymail;
   put "Hello,";
   put " ";
   put "Please see the attached circulation file for campaigns sent in the last 90 days.";
   put " ";
    put "This report can be used as a retrospective sense check. ";
	put " ";
   put"Thanks,";
   put"CWR automated message";
 run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Aug 2017 11:23:07 GMT</pubDate>
    <dc:creator>CamRutherford</dc:creator>
    <dc:date>2017-08-22T11:23:07Z</dc:date>
    <item>
      <title>Send Email with results attached as PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389768#M93469</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below code which looks at exporting the datasets. However, I'd like the email to have the HTML results attached as a PDF instead - any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let user = crf;
%let dataset=CIRC;
%let dataset1=/user/&amp;amp;user/CIRC.csv;

Data &amp;amp;dataset;
set CIRC;
run;
proc export data=&amp;amp;dataset
   outfile="&amp;amp;dataset1"
   dbms=csv
   replace; 
   run;

***update email recipients here***;
filename mymail email 
   To=("cameron.test@test.com" )
   subject="Circulation Report -  Prev 90 days"
   attach=("&amp;amp;dataset1");

data _null_;
   file mymail;
   put "Hello,";
   put " ";
   put "Please see the attached circulation file for campaigns sent in the last 90 days.";
   put " ";
    put "This report can be used as a retrospective sense check. ";
	put " ";
   put"Thanks,";
   put"CWR automated message";
 run; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 11:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389768#M93469</guid>
      <dc:creator>CamRutherford</dc:creator>
      <dc:date>2017-08-22T11:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with results attached as PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389769#M93470</link>
      <description>&lt;P&gt;I see nothing in your code that creates HTML output?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 11:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389769#M93470</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-22T11:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with results attached as PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389775#M93475</link>
      <description>&lt;P&gt;Sorry, I posted just the email aspect of the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create results (sas report) which is what I want attaching in the email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 11:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389775#M93475</guid>
      <dc:creator>CamRutherford</dc:creator>
      <dc:date>2017-08-22T11:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with results attached as PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389777#M93477</link>
      <description>&lt;P&gt;To attach a file to an email, use the attach= option in the filename email statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To directly embed HTML output, use the content_type option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename out email 'receive@domain.com' content_type='HTML';

ods html body=out;

proc print data=sashelp.class;
run;

ods html close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 12:02:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389777#M93477</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-08-22T12:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Send Email with results attached as PDF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389780#M93479</link>
      <description>&lt;P&gt;Do be aware that email is a really poor medium for distributing data. &amp;nbsp;You could hit size or other restrictions, you also have multiple copies out there, no control, email is not secure etc. &amp;nbsp;Use a web portal, with access controls.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 12:10:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Send-Email-with-results-attached-as-PDF/m-p/389780#M93479</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-08-22T12:10:49Z</dc:date>
    </item>
  </channel>
</rss>

