BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AK_07
Calcite | Level 5

I am triggering a email using SAS. Email is coming with attachment, but email body content is missing, any help??

 

/* ----------------- */

/* E-mail the report */

/* ----------------- */

filename mymail email "xxxxxxxxx.com'

subject="&dsetname. vendor data upload report"

type="text/pdf"

attach=("&client_drop_zone./log/&dsetname..pdf" content_type='application/pdf' extension='pdf') ;

%if &errrcnt eq 0 %then %do;

 

data _null_;

file mymail;

put "Here is the latest &dsetname. vendor data upload report. The job ran to completion, and external vendor data moved to study folder successfully";

put _all_; run; %end;

%else %do;

 

data _null_;

file mymail;

put "Here is the latest &dsetname. vendor data upload report. External vendor data transfer failed";

 

put _all_; run;

%end;

 

Log looks all ok

 

Message sent

To: "xxxxx@.com"

Cc:

Bcc:

Subject: xxxxxxx_xxx_lab_20200724 vendor data upload report

Attachments: ( "/sasdata/un0101/projects/zi/zitest/eds/dev/rawdata/di/rawdata/log/xxxxxxx_20200724.pdf" CONTENT_TYPE = 'application/pdf' EXTENSION = 'pdf' )

NOTE: 2 records were written to the file MYMAIL.

The minimum record length was 15.

The maximum record length was 112.

NOTE: DATA statement used (Total process time):

real time 0.19 seconds

cpu time 0.01 seconds

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Try removing the TYPE= option.

View solution in original post

1 REPLY 1
SASKiwi
PROC Star

Try removing the TYPE= option.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1667 views
  • 2 likes
  • 2 in conversation