PHP, MySQL: Receive email, auto search in DB & send email based on the results -


Visitors can contact the staff through contact form (visitors must also submit email) stored in DB Will go Now considering that the employees responded to this message, the response from the employees will be sent directly to the email. Say if the user wants to follow up on the message sent by the employee, then I would like the visitor to hit the reply button in my email service & amp; Send me your questions on the same subject, but only keep the ID in the subject line. So when the visitor sends this email, I would like to receive an email & amp; At the same time, try searching in my DB if the ID in the ID field is actually present in the system. If so, it will be sent back to the same staff member who had previously handled the response or would be assigned to a new staff member.

It is being said, how can I think how to do it. The part where I have been really caught, when employees get the actual email received from the email, how can I see DB? Say that I / am receiving email at mydomain@hotmail.com. When the visitor replies to the email, it will be sent to mydomain@hotmail.com. How can I see that the IOD in the subject line of email found on mydomain@hotmail.com is actually present in my DB on my website? This is where I really got stuck.

Thank you.

There are several ways that you can use automatically for processing email. The one you choose is going to depend on your specific needs:

  1. Configure your MTA (mail server) to run a program when at a given address Mail is received (like: support @ mydomain.com). Email messages will be passed only to handle the program. It works if you have your own mail server, and the most responsive solution, but it's quite complex to configure and usually needs to be restarted to change the mail server.

  2. Write a program that scans the mailbox periodically (either with POP or IAPAP) and then processes each new message for those situations Works better where you do not control your own mail server (like: you are using Gmail or Yahoo Mail) and are more flexible to configure.

  3. Write an extension for your MUA (mail client, eg MS Outlook, Thunderbird, etc.) It is necessary for everybody to receive the message that the same client software , And it depends on those APIs that provide your client extensions. It will not work with the web-only interface, but will allow you to process a message interactively and interact with the user.

I am in favor of first approach, although I have used another approach too.


Comments