开发者

Recognizing an email i.e ticket ID with PHP

开发者 https://www.devze.com 2023-03-20 00:02 出处:网络
Looking to be pointed in the right direction to create the ie. someone emails to support@domain.com, with their issue, the email via php is recognized that it\'s a \"fresh\" email that\'s not in the s

Looking to be pointed in the right direction to create the ie. someone emails to support@domain.com, with their issue, the email via php is recognized that it's a "fresh" email that's not in the system so the email is registered in a database, the sender of the email would receive an auto response with开发者_JAVA百科 a ticket ID saying we'll get back to them & that's their ticket and any emails back and forth with that ticket id in the subject line and/or bottom body would be registered in the database so the customer could login to the client area and see them and reply there as well.

I know DreamHost & Apple (specifically iTunes Customer Support) makes use of this "id - ticket" type system, and just want to be pointed in the correct direction.

Thanks.


This would probably be a good read for retrieving and working with emails in PHP - http://www.tuxradar.com/practicalphp/15/6/1.

Each email message should have message id in the headers, but this not something that you can really rely on so I would use some combination of a few email message attributes. Maybe the sender's email address and a checksum (http://php.net/manual/en/function.crc32.php) of the body and subject.

You could use this (http://php.net/manual/en/function.uniqid.php) to generate unique ticket ids and store them in the db or just use the primary key of the tickets/emails table.

0

精彩评论

暂无评论...
验证码 换一张
取 消