<?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 EMAIL device with .xlsx attachments in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/m-p/611619#M23613</link>
    <description>&lt;P&gt;I use the EMAIL device to send email through SAS from a Linux system. This works just fine in most cases, but when I attach an .xlsx file the file somehow gets corrupted. When I receive the email, everything looks good, but Excel can’t open the attachment. It gives an error message "We found a problem with some content in..." and then "Excel cannot open the file...". I see that the documentation for the EMAIL device has an option CONTENT_TYPE='content_type', but no indication what the possible values are. Is there a particular content type that should be specified? Or is there something else that needs to be done to allow .xlsx files to be attached? I’ve seen a post here from 2013 with the same problem, but no resolution. Below is code used:&lt;/P&gt;&lt;P&gt;filename em&lt;/P&gt;&lt;P&gt;email ("&amp;amp;emailaddr.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to = ("&amp;amp;emailaddr.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subject = "Test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attach = ("/amex2/ramp/misc/gsc_glob/tashelly/ods/GCG_Unique_CM_201911.xlsx")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emailid = "&amp;amp;emailaddr."&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file em;&lt;/P&gt;&lt;P&gt;put "Test";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 15:55:10 GMT</pubDate>
    <dc:creator>TS2000</dc:creator>
    <dc:date>2019-12-13T15:55:10Z</dc:date>
    <item>
      <title>EMAIL device with .xlsx attachments</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/m-p/611619#M23613</link>
      <description>&lt;P&gt;I use the EMAIL device to send email through SAS from a Linux system. This works just fine in most cases, but when I attach an .xlsx file the file somehow gets corrupted. When I receive the email, everything looks good, but Excel can’t open the attachment. It gives an error message "We found a problem with some content in..." and then "Excel cannot open the file...". I see that the documentation for the EMAIL device has an option CONTENT_TYPE='content_type', but no indication what the possible values are. Is there a particular content type that should be specified? Or is there something else that needs to be done to allow .xlsx files to be attached? I’ve seen a post here from 2013 with the same problem, but no resolution. Below is code used:&lt;/P&gt;&lt;P&gt;filename em&lt;/P&gt;&lt;P&gt;email ("&amp;amp;emailaddr.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to = ("&amp;amp;emailaddr.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subject = "Test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attach = ("/amex2/ramp/misc/gsc_glob/tashelly/ods/GCG_Unique_CM_201911.xlsx")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emailid = "&amp;amp;emailaddr."&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;file em;&lt;/P&gt;&lt;P&gt;put "Test";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 15:55:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/m-p/611619#M23613</guid>
      <dc:creator>TS2000</dc:creator>
      <dc:date>2019-12-13T15:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: EMAIL device with .xlsx attachments</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/m-p/611648#M23614</link>
      <description>attach=&lt;BR /&gt;	(&lt;BR /&gt;	"foobar.xlsx" content_type="application/xlsx" lrecl=32000&lt;BR /&gt;	)</description>
      <pubDate>Fri, 13 Dec 2019 16:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/EMAIL-device-with-xlsx-attachments/m-p/611648#M23614</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-12-13T16:50:34Z</dc:date>
    </item>
  </channel>
</rss>

