BookmarkSubscribeRSS Feed
Programmer26
Calcite | Level 5
Hi all,
I am working on a project where i have to generate an email through sas containing a excel as attachment and a table embedded in the email body.
I am able to add the attachment but unable to embed the output in the email body.

Here is how i am doing it for attachment
Data _null_;
From=
To=
Subject=
Attach=
Content_type ="excel" ;
Email body;
Run;
This is what i am doing right now, need to incorporate the code to add output directly in the email body.
Thank you in advance.
3 REPLIES 3
r_behata
Barite | Level 11

Try This :

 

filename myfile
	email
	to=()
	cc=()
	subject=""
	attach=("");

data _null_;
	file myfile;

	if _n_=1 then
		do;
			put ' ';
			put ' <Insert Email Body Here >';
			put ' ';
			put ' Thanks!';
		end;
run;
Programmer26
Calcite | Level 5
I am able to send an email with a excel as attachment but the concern is in the other part of the question where i have to add another output which will be embedded directly in the email body like this

Good morning
Please find below top 5 countries :
Col1 col2
A. 123445
B. 1234
C. 123
D. 12
E. 1

Regards
Xyz

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 1279 views
  • 0 likes
  • 3 in conversation