I have code that sends off an email when the job is completed.
filename outbox1 email to = ("Group1 <Group1@someplace.com>") cc = ("Group2 <Group2@someplace.com>" ) emailid = "Group2 <Group2@someplace.com>" replyto = "Group2 <Group2@someplace.com>" subject = "*** Report Summary Week Ending &lastwkenda ***" attach = "\\blah1\blahblah\blah\ReportSummary.xlsx"; ;
The email sends with no errors recorded
However only Group2 receives the email even though the email sent still shows group1 in the to field.
I have verified the spelling of the email address and it is correct, also i am able to send to group1 email through outlook with no problems.
If anyone has any ideas as to why SAS refuses to send to the group1 email please let me know.
Thanks
Thanks for the suggestions. I figured out that the email id was set to only accept emails from senders inside my organization. I had the IT Dept change the setting for the group and now everything works correctly.
Everything looks fine. If I copy your code into a SAS session and change the email addresses, it sends just fine.
The only thing I can think of is that it may have something to do with the group nature of the email address. If Outlook is doing some kind of a translation behind the scenes, that translation might not happen when sent via the simple SMTP connection that I believe SAS uses. One way to test this is to try sending a test message to the group address from outside Outlook, say through gmail or yahoo mail or something like that. If it bounces back, you'll know that the group address you're using is only valid for emails sent entirely within Outlook.
Jim
Thanks for the suggestions. I figured out that the email id was set to only accept emails from senders inside my organization. I had the IT Dept change the setting for the group and now everything works correctly.
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.
Ready to level-up your skills? Choose your own adventure.