01-03-2014 08:24 AM
While sending the email through SAS, I am not able to find a copy of sent mail anywhere.
Is there any option or any modification in the below program to locate the sent mail, which mainly required for validation purpose.
FILENAME Mailbox EMAIL to=("firstname.lastname@example.org")
01-03-2014 09:12 AM
It might be easier just to cc/bcc yourself.
I think the location of the sent mail depends on how your mail server is set up.
Are you running this on PC SAS? Or a server? What OS? That information might help others help you, as well as your settings for emailsys (SMTP?)
01-03-2014 09:21 AM
Thanks for the quick response.
Just like in Microsoft Outlook, while sending an email, a copy of it is automatically stored in the 'sent items' . Is it not possible to get a copy like this as I have no idea how to find.
I am running the tool in the Server.
01-03-2014 10:58 AM
SAS is running on a server, right? Is it a windows server, or a linux server or some other OS?
If you were running PC SAS, it can actually send the emails via Outlook. But since you're running on a server, and probably one where outlook is not installed, it goes a different route. The actual route will depend on your OS and how the mail is setup. Might be something to ask your SAS administrator.
01-03-2014 12:13 PM
I send a daily and weekly email based on a report and had the same issue of it not showing up in my sent items folder of outlook.
I send these reports as a scheduled task so it may differ if you were to send it in a normal SAS session rather than a batch. The thing is if you were to cc yourself on the email (which I do) you will see that the email is actually being sent from "overmar@</computer or server id/> on behalf of email@example.com", which means that although it is routed through your email, its not really routed through outlook (see below for actual outlook header). So the easiest thing likely is cc yourself on the email so at least you then have a copy of the email being sent.
01-03-2014 01:17 PM
One other thing although this won't get an email into your sent box, you can save the log from the submitted program which will tell you if the email was sent. This is what the log file looked like from the above email:
NOTE: The file TSC is:
E-Mail Access Device
Subject: Tscores for Thursday, Jan 2, 2014
NOTE: 9 records were written to the file TSC.
The minimum record length was 0.
The maximum record length was 151.
NOTE: The data set WORK.NULL has 1 observations and 0 variables.
NOTE: DATA statement used (Total process time):
real time 0.81 seconds
cpu time 0.04 seconds
In the log file if it says "Message Sent" then you can reasonable infer that the message was in fact sent even without a copy of it in sent items.
01-05-2014 08:19 AM
Of couse there will be no copy in the "sent items" of your mail-program.
You are not using that mail-program but instead using the real mail-interface (SMTP).
That copy can only be created if the mail-provider (server proces) handling that mail is doing that for you.