<?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: Email body error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321165#M70852</link>
    <description>&lt;P&gt;Thank you for the&amp;nbsp;answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the file "ENVIAR" to OUTBOX. The error stopped but it continued send a blank email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I put the "DATA FILE OUTBOX" before the code to send email and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Dec 2016 11:39:24 GMT</pubDate>
    <dc:creator>Bottoni</dc:creator>
    <dc:date>2016-12-26T11:39:24Z</dc:date>
    <item>
      <title>Email body error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321001#M70792</link>
      <description>&lt;P&gt;I'm trying to send an email, with some information of the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program sendthe email, however the body appears in blank and when I run the program shows the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Insufficient authorization to access 'directory'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS CODE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA WORK.SEND_EMAIL;


	ATTRIB CD_USUARIO		LENGTH= $10;
	ATTRIB NM_USUARIO		LENGTH= $80;
	ATTRIB CD_MAQUINA		LENGTH= $15;
	

	CD_USUARIO = &amp;amp;_CLIENTUSERID.;
	NM_USUARIO = &amp;amp;_CLIENTUSERNAME.;
	CD_MAQUINA = &amp;amp;_CLIENTMACHINE.;


RUN;


DATA _null_;
	SET WORK.SEND_EMAIL;
		
	CALL SYMPUT('CD_USUARIO', CD_USUARIO);
	CALL SYMPUT('NM_USUARIO', NM_USUARIO);
	CALL SYMPUT('CD_MAQUINA', CD_MAQUINA);


RUN;


FILENAME OUTBOX EMAIL
TO='email@email.com.br'
TYPE='TEXT/HTML'
SUBJECT='TESTE'
FROM='email@email.com.br';
ODS HTML BODY=OUTBOX RS=NONE;


DATA _null_;
	FILE ENVIAR;

		PUT "Srs, ";
		PUT "ISTO É UM TESTE";
		PUT " &amp;amp;CD_USUARIO. ";
RUN;

%PUT _ALL_;

ODS HTML CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 19:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321001#M70792</guid>
      <dc:creator>Bottoni</dc:creator>
      <dc:date>2016-12-23T19:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Email body error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321124#M70825</link>
      <description>&lt;P&gt;The error indicated that you are trying to access a folder or file for which you do not have access or permission. However the code you mentioned does not seem to access any folder. Please let me know if I am missing anything here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I see that you are using the filename outbox but you mentioned in file statement ENVIAR, which I think is incorrect. Please try to replace the ENVIAR with OUTBOX and execute the code.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 02:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321124#M70825</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-12-26T02:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Email body error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321165#M70852</link>
      <description>&lt;P&gt;Thank you for the&amp;nbsp;answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the file "ENVIAR" to OUTBOX. The error stopped but it continued send a blank email.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I put the "DATA FILE OUTBOX" before the code to send email and it worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 11:39:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Email-body-error/m-p/321165#M70852</guid>
      <dc:creator>Bottoni</dc:creator>
      <dc:date>2016-12-26T11:39:24Z</dc:date>
    </item>
  </channel>
</rss>

