BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
forumsguy
Fluorite | Level 6

Hi All,

We get lot of requirements on email to our team email ID asking about certain business logic calculations.

Subject line is always ---- > Enq : Datamart preprocessing

Based on that we search in our logs for that process , I want to automate this process and read subjects of the email box in a SAS Dataset.

I searched on google but could not find much helpful information

Any help in this regard would be really helpful

1 ACCEPTED SOLUTION

Accepted Solutions
jakarman
Barite | Level 11

When you are using Eguide you will find the interface to mail (Exchange) in the same location as the ODBC local uploading that to a server.

Go to the project flow area alternate mouse open.....  What you can access with that is based on the same interface as using that OLEDB/ODBC you can read all those fields/text but not the attachments.   No problem as you are needing the header.    
Exchange can be seen as a dataprovider with JET or othersHow to retrieve Exchange and Outlook data with the Jet 4.0 OLE DB provider in Access 2000" title="ht...

https://technet.microsoft.com/en-us/library/ms191461(v=sql.105).aspx   Looks weird but see also: http://support.sas.com/resources/papers/proceedings13/372-2013.pdf  and http://support.sas.com/resources/papers/proceedings10/086-2010.pdf

Reading mails can be done in a basic pop3 way: http://support.sas.com/resources/papers/proceedings09/002-2009.pdf

On a Unix platform one upon a time SAS was using the UNIX mail client (8.2) With the 9 versions it does it using a direct interface.
That works for sending, although interfaces is behind the market evolvment. As the Unix mail client seldom is used for reading mails I believe you are not after that one. 

http://support.sas.com/resources/papers/proceedings09/002-2009.pdf

---->-- ja karman --<-----

View solution in original post

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I would suggest that this would need to be in the email account, i.e. setup a rule and a VBA macro, i.e. rule = if subject line="Enq: Datamart..." then run macro Export_Text_To_File.

http://stackoverflow.com/questions/11647717/outlook-export-mail-to-text-on-rule-of-vba

Then you can read all the text files in the location you export to.  There are messaging systems out there to do such a thing.

I don't think straight off you will be able to read the email as they are normally held on IT servers under different accesses.

art297
Opal | Level 21

I haven't tried it yet but, if you have Visual Basic ( Free Dev Tools - Visual Studio Community 2013 ), then the following might provide what you need: 25631 - SAS Outlook Data Extractor

Kurt_Bremser
Super User

In case your email system runs on UNIX, it stores the mails in text files in /var/spool/mail.

If your SAS runs on a UNIX server, I suggest to set up the local mail system on that machine and have your respective mails forwarded to an account there.

jakarman
Barite | Level 11

When you are using Eguide you will find the interface to mail (Exchange) in the same location as the ODBC local uploading that to a server.

Go to the project flow area alternate mouse open.....  What you can access with that is based on the same interface as using that OLEDB/ODBC you can read all those fields/text but not the attachments.   No problem as you are needing the header.    
Exchange can be seen as a dataprovider with JET or othersHow to retrieve Exchange and Outlook data with the Jet 4.0 OLE DB provider in Access 2000" title="ht...

https://technet.microsoft.com/en-us/library/ms191461(v=sql.105).aspx   Looks weird but see also: http://support.sas.com/resources/papers/proceedings13/372-2013.pdf  and http://support.sas.com/resources/papers/proceedings10/086-2010.pdf

Reading mails can be done in a basic pop3 way: http://support.sas.com/resources/papers/proceedings09/002-2009.pdf

On a Unix platform one upon a time SAS was using the UNIX mail client (8.2) With the 9 versions it does it using a direct interface.
That works for sending, although interfaces is behind the market evolvment. As the Unix mail client seldom is used for reading mails I believe you are not after that one. 

http://support.sas.com/resources/papers/proceedings09/002-2009.pdf

---->-- ja karman --<-----
forumsguy
Fluorite | Level 6

Thanks a lot.. Solved my purpose

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 10999 views
  • 0 likes
  • 5 in conversation