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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1583 views
  • 2 likes
  • 2 in conversation