Receive and analyze emails from (POP3 or IMAP) mailbox in Symfony2

I am looking for a package / package that can access an email inbox, receive emails in the inbox, and parse them (Sender Email, Subject, Body, Applications) for processing in my Symfony2 application. The idea is a β€œhelp desk” where people can send a specific email address by email, and the cron job will be done through the mailbox and convert emails into help tickets (with attached files).

Before someone tells me Google or something is equally useless, please note that I spent more than an hour on Google and also looked at over 100 StackOverflow threads looking for something that can help me. Most content includes sending and receiving emails. I created a clean PHP parser before, and it was a nightmare (since almost every email client compiled emails a little differently).

I found https://packagist.org/packages/lasso/mail-parser-bundle , but it seems to be only for Zend. I also found https://github.com/iJanki/MailMimeDecodeBundle , but it seems that work is still going on and there is no documentation to talk about. Also, I found the Correct way to get IMAP emails in symfony2 , but this seems like the beginning of a nightmare that I had the last time I built it from scratch.

I would appreciate any suggestions or pointers from those who have implemented something similar or have been in a similar situation.

+8
php email symfony
source share
1 answer

I found a PHP class that does exactly what I wanted and neatly parses emails using Address, subject, body, and attachments. It even saves attachments to the specified location on your server.

https://github.com/barbushin/php-imap

While this is not a Symfony2 package, it is very easy to integrate into Symfony by providing the class with a namespace and then using it in the desired controller.

+6
source share

All Articles