Search code examples
emailparsingjakarta-maildata-extraction

What is the best way to programmatically extract text from an email from a additional inbox?


I recently started working at an IT company as a support agent and one of the things we do is managing the backup of our clients' servers.

It's all working nicely, but one part is just terrible, which is the backup log. The backup log is a excel file with a list of all the clients and for each of them a list of dates and whether or not the backup has succeeded on that date. The data in that document comes from emails rapports that are automatically sent when the backup finishes.

But here comes the bad part: Once in a week there is an employee who checks ALL THE EMAILS and manually fills the backup log. This was too much for me, especially knowing that we only have about 5 employees.

Solution: Make a script that does it for you. Yeah, I know and I think I'm capable of doing that, but there's a few things that I'm not sure about and I hope you guys could help me with it:

  1. The mails are all in a different folders in an inbox that I had to add to my outlook manually and I don't know how I can programmatically reach it.
  2. I don't know in what language I should use for this. I'm able to do it in a lot of languages, but I don't know which one suits this best

These are the only two things that I don't know and I would really appreciate it if you could help me with this.

EDIT:

The server is an exchange server with IMAP enabled. I eat java for breakfast and I've used JavaMail before, so I think I'll go with that, thanks


Solution

  • This is a pretty open-ended question....

    You should pick a language that you're comfortable with and that has a good email support library, e.g., JavaMail for Java.

    If the messages are in an Exchange server that has enabled IMAP support, you should be able to read the messages using JavaMail or any other library that support IMAP. If the server only supports the Microsoft proprietary protocol, you have fewer choices.

    We really need to know more about the mail server you're using to offer much more guidance.