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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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