BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
How to send E-mail (excel reports) from SAS?
3 REPLIES 3
deleted_user
Not applicable
Hi,

Pl. use below mentioned syntax.

/* Mailing Code to multiple mail id's and multiple attachement */

filename outbox email 'akash.satyam@gmail.com';

data _null_;
file outbox
to=('akash.satyam@gmail.com' 'akash1.satyam@gmail.com')
cc=('akash2.satyam@gmail.com' 'akash3.satyam@gmail.com')
subject='My SAS output'
attach=("D:\Distribution_A.zip" "D:\Distribution_B.zip")
;
put 'Hi,';
put;
/* put "Please ignore the previous mail as it was not updated and consider the enclosed file for the mentioned subject.";*/
/* put;*/
put "Please find enclosed ------.";
put "---------------------------.";
put ;
put "The file contains the following:";
put "1) A";
put "2) B";
put "3) C";
put "4) D";
put "5) E";
put /;
put "Regards,";
Put 'Akash';
run;
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello SASPhile,

In Enterprise Guide it is a pair of clicks.

Sincerely,
SPR
Cynthia_sas
SAS Super FREQ
...and in addition to the other suggestions, if you are creating reports for Excel using ODS, then a search of the forum postings and Tech Support site will reveal how to email an ODS report. Many different code samples have been posted.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1382 views
  • 0 likes
  • 4 in conversation