Assigning an Email Address To A Category

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
phoenix
Posts: 3
Joined: Sun Oct 21, 2018 6:51 am

Assigning an Email Address To A Category

Post by phoenix »

Hello,
Firstly, I am a new user of the Hesk help-desk system, and find it a lot nicer than OsTicket, to be honest.
Secondly, I was wondering (as this isn't in the knowledge base,) is there no way you can assign an email address to a category?
For instance, say I have a category called, virtual-servers.
Could I not assign an email address (I.E., virtualservers@domain.com,) to the category virtual-servers?
Currently, my clients email the default support address and all tickets go into the category called support under a priority of low.
I've created 2 other categories, but I must log into the staff panel and actually assign the tickets to the other categories.
I am running Hesk version 2.8.2.
Script URL (if needed) is
https://chavezapps.us/support
I'd appreciate any guidance that might be able to be provided.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Assigning an Email Address To A Category

Post by Klemen »

There is no built-in way (setting) for this.

What you can do is:
  1. create two copies of the "inc/mail/hesk_pipe.php" (or hesk_pop3.php or hesk_imap.php, depending on which method for email to ticket you use)
  2. inside each copy change the line

    Code: Select all

    $set_category = 1;
    to the category ID of the category you wish to. For example, if you set it to

    Code: Select all

    $set_category = 3;
    that file will assign tickets to category with ID 3.

    Similarly, you can change the priority and email login details for each of the copy, read comments in the file under OPTIONAL MODIFICATIONS
  3. setup email piping (or cron job) for the copies
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
phoenix
Posts: 3
Joined: Sun Oct 21, 2018 6:51 am

Re: Assigning an Email Address To A Category

Post by phoenix »

Klemen wrote: Sun Oct 21, 2018 4:14 pm There is no built-in way (setting) for this.

What you can do is:
  1. create two copies of the "inc/mail/hesk_pipe.php" (or hesk_pop3.php or hesk_imap.php, depending on which method for email to ticket you use)
  2. inside each copy change the line

    Code: Select all

    $set_category = 1;
    to the category ID of the category you wish to. For example, if you set it to

    Code: Select all

    $set_category = 3;
    that file will assign tickets to category with ID 3.

    Similarly, you can change the priority and email login details for each of the copy, read comments in the file under OPTIONAL MODIFICATIONS
  3. setup email piping (or cron job) for the copies
So what you are saying is this. For each copy of hesk_pop3.php for instance, I'd put something like, in a cronjob:

Code: Select all

*/5 * * * * /usr/bin/curl https://chavezapps.us/support/inc/mail/hesk_pop3-1.php
Or

Code: Select all

*/5 * * * * /usr/bin/curl https://chavezapps.us/support/inc/mail/hesk_pop3-2.php
And it should know, even if the customer emails the default support address, what categories to process tickets for?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Assigning an Email Address To A Category

Post by Klemen »

Yes, a separate cron job for each copy.

Then, make sure each copy connects to a unique mailbox, by manually modifying login details inside the copy.

You need to uncomment this code block by removing the /* from the beginning and */ at the end:

Code: Select all

/*
$hesk_settings['pop3_host_name'] = 'mail.server.com';
$hesk_settings['pop3_host_port'] = 110;
$hesk_settings['pop3_tls']       = 0;
$hesk_settings['pop3_user']      = 'user@server.com';
$hesk_settings['pop3_password']  = 'password';
*/
Don't modify the original hesk_pop3.php file and it will use login details from the settings.

In the copy, modify the user and password and the copy will login to the different account.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
phoenix
Posts: 3
Joined: Sun Oct 21, 2018 6:51 am

Re: Assigning an Email Address To A Category

Post by phoenix »

Great. Thank you so much for your help.
amycoty
Posts: 1
Joined: Wed Nov 11, 2020 11:42 pm

Re: Assigning an Email Address To A Category

Post by amycoty »

Hi Friends:
I am a newbie and need some "noncoder" type help to get the categories to go to certain addresses.
Is there a kind soul out there who could help me understand and even execute the directions in this thread?
We could hop on the phone. I am in the US.
Thank you!!!
Post Reply