Have you ever wanted to know when your code completes? Or maybe you want to automate the report to include sending an email?
Regardless, SAS is happy to send that email for you. The easiest way to do this is through the SMTP access method via filename statements.
Example:
filename sendemail email 'toaddress@email.com' subject='This is a test email.' from='fromaddress@email.com';
data _null_;
file sendemail;
put 'Hi,';
put 'This is a email sent from SAS';
run;
This is only a simple example. Here is another with an attachment.
filename sendemail email 'toaddress@email.com' subject='This is a test email.' from='fromaddress@email.com' attach='/somesascode.sas';
data _null_;
file sendemail;
put 'Hi,';
put 'This is a email sent from SAS';
run;
Email attributes can also be set in the data step through the EM_ directives.
filename sendemail email 'toaddress@email.com' ;
data _null_;
set somedataset;
put '!EM_TO! ' email_addr;
put '!EM_SUBJECT! ' subscription_name;
put name ' ,';
put 'This message was generated by a SAS data set';
put '!EM_SEND!';
run;
Do you belong to a company that sends reports back and forth via email?
Do you have a team of people dedicated to producing reports?
Ever thought there was a better way?
We think so.
We are developing solutions for customers that incorporate web2.0 technologies and collaborative software. We believe that information should be easy and actionable. If you need to know, you shouldn't have to hunt. We make it easy to get what you need and focus on the business. Interactive data, wikis, blogs, tweets, and the like can be leveraged in the right scenarios to enable an organization to be informed, nimble and competitive.
Share your company pain points with us and we'll help find custom solutions that let you focus on what is really important, your business and customers.
Contact us now to discuss your situation. Blog@afhood.com