Download Mail Plugin for Support Tickets

Hello,

I have purchased the Download Mail plugin and I would like to set up a support ticket system.

Could someone please explain the best way to set up a support ticket system? I'll be fine with the code but I'm just not sure how the process should actually work...!

For example:

Can people create support tickets by just emailing a specified email address? Or do they need to login to the website and create a ticket?

When someone replies to a ticket via their email client (e.g. Gmail/Outlook) will the reply be saved in the database?

If someone could describe a water tight way of setting this up that would really help me to get going.

Thank you,

Greg

By Dave - September 27, 2016

Hi gversion,

There's quite a bit to figure out to have a functioning support system, but the nice thing about building it custom is you can have it work exactly the way you want and you're not limited but someone else's design decisions.

I'd start by mapping it out on paper, but generally I'd recommend having users email a support email address, then using a cron to check for email received via Download Mail, then moving/copying it into your ticket system.  For existing tickets what you can do is have a ticket number in the subject line that indicates which ticket the email is associated with.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By Dave - September 27, 2016

Hi Greg, 

When there is a unique ticket number in the subject then I guess these emails can somehow be displayed as a thread in the CMS, is that right?

Yea, so for example when you receive a new email, you could copy it into a "posts" table with a threadID field.  And then you'd either create a threadnum or parse it out of the subject (eg: "#123456 Subject Here").  Then you could list all the posts with the same threadID.  One way to do that is to use a related records field.

Also, do you have any preference over POP3 or IMAP? Anything to consider when choosing a protocol?

Hmm, I don't have a preference that I can recall right now.  Probably whatever is easier to setup on the server side.

Cheers!

Dave Edis - Senior Developer
interactivetools.com

Hi Dave,

This all makes sense, thanks for the message. I really appreciate the help.

Kind regards,

Greg

Hi Dave,

I actually have another question please...

You mentioned copying a message to a "posts" table with a threadID field. Why not just keep the messages in the "_incoming_mail" table rather than copying them to a separate table?

I would like to be able to manipulate downloaded messages (e.g. assign to users, assign to categories) so could I just add these fields to the "_incoming_mail" table? Or would you advise against this, hence the reason you suggest copying them to another table?

Obviously I wouldn't want my customisations overwritten when the plugin is updated.

Thanks again,

Greg

By Dave - September 29, 2016

Hi Greg, 

I'd definitely copy them out of the _incoming_mail table.  That table has fields and information specific to email messages.  I'd think of that as a queue of new data to process.  You could check it every minute with a cron job and have it parse the messages and filter the relevant data into tables you've created that are optimized with only the fields for your ticket system, then remove the message from the _incoming_mail table.

This will also keep the components separate and easier to test and debug as each section does only one thing.  The _incoming_mail table stores received mail, the cron job parses those messages and adds the data to the tickets/posts tables, etc.  

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com