DATA Step, Macro, Functions and more

Emailing from SAS

Reply
New Contributor
Posts: 2

Emailing from SAS

I have a SAS job which emails a report to a number of internal e-mail addresses which has been running succesfully, but now I also need to send the report to an external email address which is causing problems.

I seem to able to send the report to reciepients where the address is of the type 'myemail@domain.com', but not if it is of type 'my.email@domain.com' - for this type of address I get a 'Message Status - undeliverable' message from my e-mail client saying

The message that you sent was undeliverable to the following:

my.mail.@whatever.com (501 5.5.4 Invalid Address)


i.e. it looks like the first character after the first '.' in the email address is being dropped, and an extra '.' is being added before the '@'.


I'm using SAS 9.1.3 SP4 with settings

EMAILAUTHPROTOCOL=NONE
EMAILHOST=LOCALHOST
EMAILID
EMAILPORT=
EMAILPW
EMAILDLG=NATIVE
EMAILSYS=MAPI

and using Groupwise 7.0 as email client.


Any help would be greatly appreciated,
Ben
Super Contributor
Super Contributor
Posts: 3,174

Re: Emailing from SAS

From what you shared in the error message, there is a period character generated *BEFORE* the "@" in your EMAIL address.

Scott Barry
SBBWorks, Inc.
Super Contributor
Posts: 292

Re: Emailing from SAS

I'm able to send mail to firstname.lastname@gmail.com with these options:

-emailhost=usenet.xxxxxx.ca
-emailsys=SMTP

where "xxxxx" also happens to be the name of our domain.
New Contributor
Posts: 2

Re: Emailing from SAS

Exactly - so if I hard code

Email ("benfenton@whatever.com")

then Groupwise succesfully delivers the mail, but if I hard code

Email ("ben.fenton@whatever.com")

then Groupwise tries to send the mail to ben.enton.@whatever.com

Ben
Super Contributor
Super Contributor
Posts: 3,174

Re: Emailing from SAS

The outgoing EMAIL recipient's address should be clearly listed in your SAS log -- so if it is missing the trailing period as generated by SAS, I would say that you have some non-SAS issue - do you agree? My suggestion is to check your SAS code and SAS log very closely to ensure that the error is not being generated by your code -- then if all looks well as the EMAIL leaves SAS, it's time to discuss the problem with your EMAIL system techies.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 4 replies
  • 177 views
  • 0 likes
  • 3 in conversation