Question

I am not sure what this called or how to implement it so I am looking for a starting point. Basically I am looking for a solution where a server sends a unique email out (ex:vkdndk@example.com), easy enough to do. But I am wondering if a person responds to that email address, what kind of mail server setting to do I need to have vkdndk@example.com correspond to an ID in a database and have information sent back become part of a thread?

Was it helpful?

Solution

All you should need to do is issue a query like SELECT id FROM users WHERE email LIKE ? and bind the email as a parameter. That should return your userid, so you can go forward.

However, I feel that I need to warn you that it's not a very good idea to do this. Email headers are quite easily faked. So if someone knows your email address, they can post anything they want as you by simply faking the From header. So I'd add some more protection like requiring a password or key in the email to identify it as being from the real person...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top