sas Sending an email with SAS Attaching an excel file to your SAS email


Example

Filename myEmail EMAIL
    Subject = "My Email Subject"
    From    = "myFromAddress@email.com"
    To      = 'toAddress@email.com'
    CC      = 'ccAddress@email.com'
    Type    = 'Text/Plain'
    ATTACH = ("my/excel/file/path/file.extension" content_type="application/vnd.ms-excel" LRECL= 32767);


Data _null_; File myEmail;
    PUT "Email contentent";
    PUT "&recordsCount loaded to your favorite table today!";
RUN;