0

I have an email delivered to a specific inbox which contains a number of fields I need to scrape.

The fields will be subsequently fed into a workflow system.

For example:

From: example@other.com
To: specificinbox@mycompany.com
Subject: New starter notification

Message:

Name: John Smith
Start Date: 01/12/2016
End Date: 31/12/2016
..

Is there software which could automatically listen to or poll the email account for new emails, and extract these fields (John Smith, 01/12/2016, 31/12/2016) or dump the entire email into a text file for further scraping?

Alternatively, a workflow system which can interpret emails out of the box.

Other information:

  • The format of the email is fixed.
  • Email server is Exchange Server 2013.
  • The mail server isn't IMAP enabled :(
  • The system sending the email does not provide an API or web service to extract the information.
  • Preferably this should run on Windows Server 2016.
  • Price would depend on what else the software can do. We are looking at a full-fledged workflow tool, such as Alfresco/Anypoint, but I'm not sure how email input will feed in.
  • If your email server also allows you to fetch mail using IMAP you will open up a lot more options. Presumably you want something to run on windows? – meuh Nov 24 '16 at 9:54
  • @meuh The mail server isn't IMAP enabled :( – Blair Nov 24 '16 at 22:43
2

Python can either use the exchangelib library to communicate directly with your Exchange 2013 Server, (Supports Microsoft Exchange 2007-2016 Server or Office365) via Exchange Web Services (EWS) unless your administator has disabled this feature, or you use the Win32Com library as demonstrated in this SO Question in conjunction with your local Outlook installation.

Either will get the email for you and python has numerous built in tools for parsing the text into fields.

  • Free, Gratis & Open Source
  • Python & exchangelib are cross platform
  • Win32Com is Windows only unsurprisingly & relies on you having Exchange installed on your computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.