Forum Moderators: coopster
I would like to do this in PHP with MySQL. Does anyone know of any code out there to do something like this, or maybe give me some ideas on how to approach this problem? I am about a 4 on a scale of 1-10 in PHP/MySQL development, but I think this could be a good way to learn some code.
Thanks,
Dalton
Look at this forum's library [webmasterworld.com]. There's some good stuff in there about extracting data from mysql, protecting forms from hijacking, emailing, etc.
When someone sends an email, you'd probably want to create some sort of unique message ID that gets sent along with the message. Then when someone replies, that id comes back to you so you can look up the sender's email address. There's actually an id that gets generated as part of the protocol but if you generate one on your own that's more pertinent to your application it'll likely be easier to manipulate.
You may want to think about sending the recipient a notification only, that is, not send the email content itself. The recipient then logs in to your site to read the note and is right there to reply so that you've got the message id. If you allow the recipient to reply using his/her email client, then the id would need to be in the subject line (easier) or embedded in the content (harder), and you'd need to make sure you could handle the absence of the id in the event that it was deleted from the reply.
I've been brainstorming and I think it would make sense to eventually add two way communication (basically turn it into an anonymous ticket tracking system) which seems like it would probably require some sort of login as well as the ability to add multiple messages per ticket. It's an interesting project.
Cheers,
Dalton