I need email processing capabilities with haskell and I am looking for appropriate libraries and advice.

For learning purposes, I am doing an application that has to receive a ticket via email and then be able to reply to it.

For the receiving part I see two options:

Finding an IMAP library and pulling the tickets this way.
Are there any IMAP libraries around?
Setting up local MTA on the same machine and dumping mails to the local maildir.
Again, are there any maildir processing libraries or is it easy to do?

As for the sending part, I'd pipe the email to a local command line mail client like mutt.
Unless there is a library that does all that?

1 Answer
1

There are two libraries for parsing mbox files as generated by procmail or the like. The first is mbox, which I am familiar with and recommend. The second is codec-mbox, which also looks to be of good quality. You can also try imapget, to fetch from imap servers directly.

There are also two libraries for sending email. mime-mail lets you create messages and send them via the sendmail executable, which is available cross-platform. smtp-mail, building on mime-mail, allows you to use smtp directly.