![]() | ![]() | ![]() | ![]() |
When sending files as SMTP email attachments from SAS® 9.2 and later, the following error might occur:
ERROR: An attachment record was truncated. The attachment LRECL is too small.
However, increasing the value of LRECL does not prevent the error.
To circumvent, specify the CONTENT_TYPE= (or CT=) option in the FILENAME statement for the attachment as shown in the example below:
filename sendit email from="user@company.com" to="someone@domain.com" subject="Excel files from SAS" attach=("myfile.xls" content_type="application/vnd.ms-excel");
The value for CONTENT_TYPE can be determined by looking at the MIME type of the file. For example, some common file extensions with content_type values are:
*.html text/html *.pdf application/pdf *.rtf application/rtf *.xls application/vnd.ms-excel
Product Family | Product | System | Product Release | SAS Release | ||
Reported | Fixed* | Reported | Fixed* | |||
SAS System | Base SAS | Solaris for x64 | 9.21 | 9.2 TS2M0 | ||
Linux for x64 | 9.21 | 9.2 TS2M0 | ||||
OpenVMS on HP Integrity | 9.21 | 9.2 TS2M0 | ||||
HP-UX IPF | 9.21 | 9.2 TS2M0 | ||||
Linux | 9.21 | 9.2 TS2M0 | ||||
64-bit Enabled Solaris | 9.21 | 9.2 TS2M0 | ||||
64-bit Enabled HP-UX | 9.21 | 9.2 TS2M0 | ||||
64-bit Enabled AIX | 9.21 | 9.2 TS2M0 | ||||
SAS System | N/A | z/OS | 9.2 TS1M0 | |||
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |||||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |||||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |||||
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |||||
Microsoft® Windows® for x64 | 9.2 TS1M0 | |||||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |||||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |||||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |||||
Microsoft Windows XP Professional | 9.2 TS1M0 | |||||
Windows Vista | 9.2 TS1M0 | |||||
Windows Vista for x64 | 9.2 TS1M0 | |||||
64-bit Enabled AIX | 9.2 TS1M0 | |||||
64-bit Enabled HP-UX | 9.2 TS1M0 | |||||
64-bit Enabled Solaris | 9.2 TS1M0 | |||||
HP-UX IPF | 9.2 TS1M0 | |||||
Linux | 9.2 TS1M0 | |||||
Linux for x64 | 9.2 TS1M0 | |||||
OpenVMS on HP Integrity | 9.2 TS1M0 | |||||
Solaris for x64 | 9.2 TS1M0 |