Jump to content

Making a ticketing system - How to get data from e-mails


Recommended Posts

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!
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
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).
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
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?
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.