I created a macro, and try to use the macro to send a .sas7bdat file to an email. And I got the error message of "ERROR: An attachment record was truncated. The attachment LRECL is too small.", even after I specified the LRECL=32767, and file type as filetype=application/octet-stream, extension = sas7bdat. The code is as below. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %macro email2box(emailaddress=, filepath=, filetype=); filename MailBox email "&emailaddress" attach="&filepath"; data _null_; file MailBox; put '!EM_ATTACH!' "&filepath" LRECL=32767; put '!EM_CONTENTTYPE!' "&filetype" extension = 'sas7bdat'; run; %mend email2box; %email2box(emailaddress=abc@u.box.comm,filepath=/box/icon_lab.sas7bdat, filetype=application/octet-stream);
... View more