kkibak Posted December 19, 2006 Share Posted December 19, 2006 Hello,I'm writing a ticketing system for a site of mine and have set up a "help" form users fill out to send in questions, etc. Now I'm setting up the backend so that an admin can view the ticket and respond to it by filling in a textarea and pressing send. The next step is where I'm hung up--the e-mail will be sent from something like "support@site.com"--and now, when the customer/visitor replies to the support response e-mail, I want to write something that automatically takes that response and adds it to our ticket history (by storing it in the DB).My question is how do I go about reading the response e-mails using a script? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/ Share on other sites More sharing options...
craygo Posted December 19, 2006 Share Posted December 19, 2006 The customers are filling this form out on your site I assume. Why not have the data get inserted as soon as they fill out the form. I see how when you respond in an e-mail they will respond in an e-mail but why not have 2 tables one with the support ticket info and the other with the responses that link to the support ticket through the id. Then when you respond to them an e-mail will be sent out to them to go to your site and respond that way. Their response then can be put directly into the database. Just seems like an easier way to keep track.Ray Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-144750 Share on other sites More sharing options...
kkibak Posted December 19, 2006 Author Share Posted December 19, 2006 Hey, thanks for the quick reply.Actually I already am inserting the data as soon as they fill out the form. Your suggestion makes a lot of sense and would certainly be the easy way out so I'd like to do it, but I'm just too afraid that my visitors will just click reply all the time. They are very internet illiterate and anything foreign to them is a problem... If it's not possible to do it the way I was hoping, I could do it the way you suggested, although I'd prefer to give them both options (just clicking reply on outlook or whatever, or clicking a link to view the ticket on our site). Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-144754 Share on other sites More sharing options...
craygo Posted December 19, 2006 Share Posted December 19, 2006 it is certainly possible but probably alot of work on your part. You would have to copy and paste their response out of the e-mail or save it as a file then run your script to parse through the file to get your data out. The data will have to be the same format all the time. Alot of headaches to me. Maybe some of the other guru's have a better suggestion for ya.Ray Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-144756 Share on other sites More sharing options...
kkibak Posted December 19, 2006 Author Share Posted December 19, 2006 Hmmm... there must be a way to automate that, right?I mean all I'm trying to do is use a dedicated e-mail address and have a script that runs either on a cron or when it detects that new mail has arrived. The script should then take the e-mail address of the sender, the subject, and the message body. I would then display the response in the admin section, based on the sender's e-mail address.Using mail ( ) you can send--what do you use to receive/check? Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-144780 Share on other sites More sharing options...
HuggieBear Posted December 20, 2006 Share Posted December 20, 2006 There is a way, and I believe you need to use the IMAP protocol. There's some information about it [url=http://uk.php.net/manual/en/function.mail.php]here[/url].RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-144850 Share on other sites More sharing options...
kkibak Posted December 20, 2006 Author Share Posted December 20, 2006 Hey, just in case others have a similar question, the IMAP module is the way to go... I'm using that in conjunction with a class i got from phpclasses.com for receiving mail and I was able to set it up really easily... the only hard part was getting IMAP set up on my server. Quote Link to comment https://forums.phpfreaks.com/topic/31282-making-a-ticketing-system-how-to-get-data-from-e-mails/#findComment-145411 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.