I had used the below code but i get the following error.
FILENAME outmail EMAIL
SUBJECT="Results as of %sysfunc(date(),yymmdd10.)"
FROM= "email";
DATA _NULL_;
FILE outmail
TO= "email"
ATTACH="C:\Users\sas\Desktop\outlier.html";
PUT "Here are the results of your query";
RUN;
error message -
ERROR: Undetermined I/O failure.
Hi:
You might want to open a track with SAS Tech Support about this. Generallly, there are various options that must be set in order for email to work correctly. The options are documented in the discussion of email in the doc. It will be necessary to know, for example, whether you are using SMTP or POP mail, what you operating system is, what the name of your mail host and other options.
cynthia
There are lots of ways for the e-mail interface to fail. A couple of things to check:
Doc Muhlbaier
Duke
Hi,
Which version of SAS are you running? If you are running a 64-bit version of SAS® 9.2 in a Windows x64 operating environment with Microsoft Outlook 2007 or 2010 or Lotus Notes as the 32-bit MAPI client.
The behavior does not occur with the 32-bit version of SAS 9.2 on a Windows x64 machine with a 32-bit MAPI client such as 32-bit Microsoft Outlook or 32-bit Lotus Notes.
Likewise, the behavior does not occur with 64-bit SAS with a 64-bit MAPI client such as Outlook 2010 64-bit edition. The system type architecture of SAS and the MAPI e-mail client software should match. Otherwise, the error occurs.
Please refer to the documentation provided in the following link
http://support.sas.com/kb/41/961.html
Hope this helps!
Thanks
I have suggested a few changes to the lines denoted by <<<<<.
For the first line corresponding to FILENAME , I think you should include an email address of the recipient.
FILENAME outmail EMAIL 'address' <<<<
SUBJECT="Results as of %sysfunc(date(),yymmdd10.)"
FROM= "email";
DATA _NULL_;
FILE outmail
TO= "email"
ATTACH="C:\Users\sas\Desktop\outlier.html";
PUT "Here are the results of your query";
RUN;
FILENAME MailBox EMAIL 'mailid@xxxx.com'
SUBJECT='Batch_summary'
attach="F:\Batch_Summary.xls";
options emailsys=smtp emailid='myemailid@xxxx.com' emailpw=xxxxx EMAILHOST=mail.xxxx.com;
data _null_;
file mailbox;
put /' Hi All,' /;
put ' Batch executed, check the attachment for log and comparison issues.' /;
put ' Regards';
put ' SAS 9.3';
run;
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 16. Read more here about why you should contribute and what is in it for you!
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.