DATA Step, Macro, Functions and more

E-mail from SAS

Reply
Super Contributor
Posts: 673

E-mail from SAS

How to send E-mail (excel reports) from SAS?
N/A
Posts: 0

Re: E-mail from SAS

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;
Super Contributor
Super Contributor
Posts: 365

Re: E-mail from SAS

Hello SASPhile,

In Enterprise Guide it is a pair of clicks.

Sincerely,
SPR
SAS Super FREQ
Posts: 8,866

Re: E-mail from SAS

...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
Ask a Question
Discussion stats
  • 3 replies
  • 514 views
  • 0 likes
  • 4 in conversation