BookmarkSubscribeRSS Feed
Banu
Obsidian | Level 7

Hi ,

 

I am trying to send ods output to my email body, but unfortunatly I am getting ERROR: Email: The connection was refused.

 

Below is my sample code.

 

 

options emailsys=smtp emailhost="xxxxx.net";

 

filename temp email to="prince.jvk@xxx.com"

subject="testing the email interface"

type="text/html";

 

ods html body=temp;

 

proc print data=sashelp.class;

run;

 

ods html close;

 

Please let me know your sugegstions on this.

3 REPLIES 3
Kurt_Bremser
Super User

Does

filename temp email to="prince.jvk@xxx.com"
subject="testing the email interface"
type="text/html";

data _null_;
file temp;
put "this is a test";
run;

work?

You may have to specify more email-related options, like emailport, emailid and emailpw.

Banu
Obsidian | Level 7
I have tried this way also..it's also giving same issue.
I suppose to send a mail to group of people ,in this case what password i needs to give here. Please let me know what other options i can give to execute this mail command..
Kurt_Bremser
Super User

@Banu wrote:
I have tried this way also..it's also giving same issue.
I suppose to send a mail to group of people ,in this case what password i needs to give here. Please let me know what other options i can give to execute this mail command..

You need to check that with the people who run the SMTP server. Or you consult the configuration of an email client that uses the same SMTP server for sending mail.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1353 views
  • 0 likes
  • 2 in conversation