<?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: Code for sending email displays error despite apparently correct syntax in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697556#M37470</link>
    <description>&lt;P&gt;Try this as the content_type&lt;/P&gt;
&lt;PRE&gt;application/vnd.ms-excel&lt;/PRE&gt;
&lt;P&gt;this is just a quick shot from the hip, not tested in any way.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 10:00:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-09T10:00:49Z</dc:date>
    <item>
      <title>Code for sending email displays error despite apparently correct syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697550#M37469</link>
      <description>&lt;P&gt;This is the code I wrote&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;proc export data=work.XYZ
  outfile="XYZ.xlsx"
  dbms=xlsx replace;
run;

filename outbox email
  from='abc@abc.com'
  to='abc@abc.com' 
  type='text/html'
  subject='Test Mail'
  attach=("XYZ.xlsx" content_type="excel");
  
ods html body=outbox rs=none style=Htmlblue;

proc odstext;
  p 'Hello,';
  p ' Please find the attachment';
  p 'Thank You';
  title;
run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get error at this line&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;attach=("XYZ.xlsx" content_type="excel");
 &lt;FONT color="#FF0000"&gt;                                     _
                                     24&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR 24-2: Invalid value for the attach option.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Please let me know what am I missing, or if this is a bug which has a workaround.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 09:52:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697550#M37469</guid>
      <dc:creator>Rohit2RaiAxis</dc:creator>
      <dc:date>2020-11-09T09:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Code for sending email displays error despite apparently correct syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697556#M37470</link>
      <description>&lt;P&gt;Try this as the content_type&lt;/P&gt;
&lt;PRE&gt;application/vnd.ms-excel&lt;/PRE&gt;
&lt;P&gt;this is just a quick shot from the hip, not tested in any way.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 10:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697556#M37470</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-09T10:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Code for sending email displays error despite apparently correct syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697563#M37471</link>
      <description>Tried it. Still the same error &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 09 Nov 2020 10:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697563#M37471</guid>
      <dc:creator>Rohit2RaiAxis</dc:creator>
      <dc:date>2020-11-09T10:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Code for sending email displays error despite apparently correct syntax</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697575#M37472</link>
      <description>&lt;P&gt;Have a look at &lt;A href="https://stackoverflow.com/questions/2937465/what-is-correct-content-type-for-excel-files" target="_blank"&gt;https://stackoverflow.com/questions/2937465/what-is-correct-content-type-for-excel-files&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 11:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Code-for-sending-email-displays-error-despite-apparently-correct/m-p/697575#M37472</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-11-09T11:17:18Z</dc:date>
    </item>
  </channel>
</rss>

