01-02-2014 02:07 PM
I've got SAS 9.3, and I'm writing a job data step which will be scheduled at some time, and I'd like to send a report email at the end of the process.
I'm trying using a gmail account, but as far as I read there is no way to do it because of the gmail ssl protocol.
Is there no way at all? I read that two solutions are upgrading to sas 9.4 (unfortunately we can't) or use the email feature from sas EG (but I need to do it in a data step since the job is scheduled and it is independent of the EG). Should I give up? Are there other solutions?
Thank you very much in advance.
01-02-2014 04:16 PM
The ssl/tls requirement is holding your mail/smtp option off. The most easy circumvention is finding a mail provider not requiring ssl (until 9.4)
01-03-2014 03:59 AM
filename sendmail email
attach="/sasdata/test.xls" /*sample attachemnt*/
Put " ";
put "Email notification:";
put " ";
01-03-2014 04:07 AM
Message(s) received from the pipe command:
/bin/bash: /data/sas/config/Lev1/SASApp/MAPI: No such file or directory
ERROR: Email could not be sent
Thanks a lot
01-03-2014 01:20 PM
To be able to send mail all conditions outside the SAS environment must be met.
==> Your machine must be able to get to a mail-server not being blocked by firewalls
Often it is known as a bulk-mail authorisation. It is locked-down by the wish of preventing spam.
Your mail guys should be able to tell you.
Often this is locked-down totally with firewall's as the access to an external world would also open up black-hat hack opportunities.
Your network guys should be able to tell you.
With a more simple hosting providers usage (like home conenctions) many of the ports like 25 are closed by them but your external connection is open.
You external mail provider should offer you an other port like 487 (just an exampel) for this.
You could check this using the telnet client (adres port). It will always fail but the message why it fails is more interesting. Failing by no access (firewall) or wrong protocol (ah,,,, mail should work)
==> Your mail-protocol should be understood. There are more parameters often needed to be set.
If the one that is offering (SAS) the protocol and the provider are not well cooperating you are into a deadlock.
01-08-2014 02:15 PM
01-08-2014 05:44 PM
Thank you for all your suggestions, unfortunately the sas server machine I'm using is very poorly configured and limited, and I don't have an admin-like access to configure it, so I didn't succeed to do any of the solutions you proposed, also because of the proxy server.
Anyway, I managed it in another "dirty" way: first, I wrote a simple php page hosted on some server which gets the email parameters (recipients, subject, body, ...) through the POST method and send the email; then, in sas code I call such a page using html post (which has also parameters to set the proxy server). Therefore, the sas batch builds the email parameters for the report and passes them to the php page through POST, and the php page gets the parameters and send the report by mail.
I admit it is a little bit twisted, but it works great!
Thank you again for your help.