BookmarkSubscribeRSS Feed
Arjumand
Calcite | Level 5

Hi,

 

I am trying to send a mail using SAS 9.3 using the below statements:

 

filename mymail email To='abc@gmail.com' subject='Connection Status';
data _null_;
file mymail;
put "hi";
run;

 

When I run it, I get an outlook prompt to allow/deny the sending of mail followed with an error in log:-

 

ERROR: Undetermined I/O failure.

 

how to get rid of this error and the warning?

3 REPLIES 3
Quentin
Super User

Hmm, undetermined I/O errors are hard.   Your code works for me, running 9.3 on Win 7:

 

1    filename mymail email To='someone@gmail.com' subject='Test email';
2    data _null_;
3     file mymail;
4    put "hi";
5    run;

NOTE: The file MYMAIL is:
      E-Mail Access Device

Message sent
      To:          someone@gmail.com
      Cc:
      Bcc:
      Subject:     Test email
      Attachments:
NOTE: 1 record was written to the file MYMAIL.
      The minimum record length was 2.
      The maximum record length was 2.

 

Maybe you should check your email options, e.g. emailhost, emailsys, etc.  Mine look like:

6    %put %sysfunc(getoption(emailhost));
LOCALHOST
7    %put %sysfunc(getoption(emailsys));
MAP
The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.
Arjumand
Calcite | Level 5

@Quentin: This is what i get:-

 


51 data _null_;
52 %put %sysfunc(getoption(emailhost));
LOCALHOST
53 %put %sysfunc(getoption(emailsys));
MAPI
54 run;

Quentin
Super User
I would suggest working with tech support. They should be able to dig into what may cause the undetermined I/O failure. Your code works for me, and sounds like it works for you, at least as far as SAS telling outlook "Please send and email," and then something breaks.
The Boston Area SAS Users Group is hosting free webinars!
Next up: Bart Jablonski and I present 53 (+3) ways to do a table lookup on Wednesday Sep 18.
Register now at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1599 views
  • 0 likes
  • 2 in conversation