Hello Everyone!
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.
Please help.of
FILENAME Mailbox EMAIL to=("manager@cisco.com")
Subject="Router configuration"
ATTACH= "C:\a.txt"
DATA _NULL_;
FILE Mailbox;
PUT "Hello";
RUN;
Hi,
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?)
--Q.
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.
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.
Abraham,
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 overmar@ccf.org", 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.
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
Message sent
To: "xxxx@xxx.org"
Cc: "overmar@ccf.org"
Bcc:
Subject: Tscores for Thursday, Jan 2, 2014
Attachments: "xxxx.pdf"
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.