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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1329 views
  • 0 likes
  • 3 in conversation