Search code examples
phphtmlemailimappop3

How to automatically create support ticket via email


I am designing a support ticket system in PHP and would like for support tickets to be automatically created when an email is sent to a specific email address.

For example, if someone emails [email protected], when the incoming mail arrives on the server, a support ticket is created (however I code that). Also, when someone replies to an email with an existing support ticket number in the subject, it will add that email reply to the existing ticket.

So, basically, I want my server to monitor any incoming messages to a specific email address. When messages arrive, take it and run it through a php page and I can break it down from there.

How is this done? I've seen it done many times with hosting companies, etc. You can respond via email and support tickets are automatically created.

Thank you!


Solution

  • You basically need to set up an IMAP server and have your PHP script poll for new messages, then track them accordingly. That's really the only, or at least, the most straightforward way.