<?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 Results as a part of Email body- Not as attachment in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354124#M64084</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add a dataset in table format in the email body as well as add text to format the email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;right now I am only add the dataset and unable to add texts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result.html has the dataset output in html format&lt;/P&gt;&lt;P&gt;The code is below:&lt;/P&gt;&lt;PRE&gt;FILENAME Mailbox EMAIL "&amp;amp;email"
Subject='Test Mail message'
content_type="text/html";

DATA _NULL_;

FILE Mailbox;
infile "/home/sm25967/DQ_2/QVCDE_QC_Report/result.html";
input;
RUN;
filename Mailbox clear;
&amp;nbsp;&lt;/PRE&gt;</description>
    <pubDate>Thu, 27 Apr 2017 14:21:01 GMT</pubDate>
    <dc:creator>sreeparna93</dc:creator>
    <dc:date>2017-04-27T14:21:01Z</dc:date>
    <item>
      <title>Results as a part of Email body- Not as attachment</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354124#M64084</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add a dataset in table format in the email body as well as add text to format the email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;right now I am only add the dataset and unable to add texts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;result.html has the dataset output in html format&lt;/P&gt;&lt;P&gt;The code is below:&lt;/P&gt;&lt;PRE&gt;FILENAME Mailbox EMAIL "&amp;amp;email"
Subject='Test Mail message'
content_type="text/html";

DATA _NULL_;

FILE Mailbox;
infile "/home/sm25967/DQ_2/QVCDE_QC_Report/result.html";
input;
RUN;
filename Mailbox clear;
&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:21:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354124#M64084</guid>
      <dc:creator>sreeparna93</dc:creator>
      <dc:date>2017-04-27T14:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Results as a part of Email body- Not as attachment</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354125#M64085</link>
      <description>&lt;P&gt;There was a similar question earlier today, my response was:&lt;/P&gt;
&lt;P&gt;A good way to data into an email is to put it out from a dataset:&lt;/P&gt;
&lt;PRE&gt;filename mailbox email 'someone@world.com'
  subject='Total Sales';
data _null_;
  file mailbox;
  set your_data;
  if _n_=1 then do;
    put "Hello";
    put "This is a the Total Sales";
  end;
  put _all_;
run;
filename mailbox clear;&lt;/PRE&gt;
&lt;P&gt;You can find further examples, such as attaching reports, here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2008/038-2008.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://www2.sas.com/proceedings/forum2008/038-2008&lt;WBR /&gt;.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354125#M64085</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-27T14:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Results as a part of Email body- Not as attachment</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354130#M64086</link>
      <description>&lt;P&gt;I'd use ODS HTML to create the complete body of the email (including tables and free text).&lt;/P&gt;
&lt;P&gt;Then do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
file Mailbox;
infile "/home/sm25967/DQ_2/QVCDE_QC_Report/result.html";
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That way your whole mail body is formatted as HTML, and the mail agents will understand that because the mail body starts with a &amp;lt;HTML&amp;gt; tag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:30:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Results-as-a-part-of-Email-body-Not-as-attachment/m-p/354130#M64086</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-27T14:30:08Z</dc:date>
    </item>
  </channel>
</rss>

