I have for years as a side project wanted to build a nice little PHP library that can allow emails sent to a predefined email address to then be parsed with PHP and saved into a MySQL database.
Many support ticket and help desk have this functionality. You can send an email to an address and based on the email address it is from and content it will create a support ticket for a user. Also reply emails will add ticket replies to the system al from Emails sent.
This whole concept has always fascinated me and at one time I had done enough research to fully know how to do it. It's been years now though and I am not sure the best route to achieve this anymore and I am looking for information on how to do it now.
I would like to build some sort of SugarCRM plugin that uses this capability to be able to assign emails from my clients to there Account and Contact records in my CRM.
My initial search tonight has found this project PHP Mime Mail Parser here https://code.google.com/p/php-mime-mail-parser/ It states: "You will need to download the email to a file first and then pass it to MimeMailParser." So that could be helpful to find a program or method that does that as well...saves the emails to a file where I can access with PHP and then delete them. I just am not sure if that is the best and standard route of doing this?
Also this library which looks the same but on Github and recently worked on (recent to the post date of this question that is) https://github.com/eXorus/php-mime-mail-parser
1) Is there some special email software to run on the server to simplify this process?
2) How can I achieve this? I am not looking for how to read the email and parse the ID and other data in the email content...I just need help with getting the email content passed to my PHP script!
Of course, if some open source library exist that I can study or maybe even use that does this functionality, that would be amazing too but I am not aware of it yet.
Look forward to some info on the subject please?
This is a similar question to How do I parse emails in realtime as they are received however the answer on that question explains how to pipe/forward emails to a PHP script only if you are using CPanel which I am not! It is the desired action I need, just without CPanel's help.