Page 1 of 1

Multiple email accounts working within Hesk

Posted: Wed Aug 24, 2022 12:31 pm
by jfarr2022
Hi guys,

I have just found Hesk and set it up locally this morning and all in all, it seems like a great solution for my needs.

One question I have though is, can it support multiple email accounts?

What I mean is we have 2 email accounts (probably more in the future) customerservices@ and processing@ and I'd like all emails to both accounts come into Hesk so Hesk is the main hub for all email enquiries. As it is, I can only seem to be able to see having one main email account without the option to add another.

Could this somehow be achieved using the categories?

Thanks
John

Re: Multiple email accounts working within Hesk

Posted: Wed Aug 24, 2022 3:09 pm
by Klemen
There's no built-in way to do that, but you can:

1. make a copy of the "inc/mail/hesk_imap.php" file (or hesk_pipe.php or hesk_pop3.php, depending on what you use)
2. open the copied file in a powerful text editor, such as the free Notepad++
3. find and uncomment variables, and override the values; for example change

Code: Select all

// Uncomment lines below to use different IMAP login details than in settings
/*
$hesk_settings['imap']           = 1;
$hesk_settings['imap_job_wait']  = 15;
$hesk_settings['imap_host_name'] = 'imap.gmail.com';
$hesk_settings['imap_host_port'] = 993;
$hesk_settings['imap_enc']       = 'ssl';
$hesk_settings['imap_keep']      = 0;
$hesk_settings['imap_user']      = 'test@example.com';
$hesk_settings['imap_password']  = 'password';
*/
to

Code: Select all

// Uncomment lines below to use different IMAP login details than in settings
$hesk_settings['imap']           = 1;
$hesk_settings['imap_job_wait']  = 15;
$hesk_settings['imap_host_name'] = 'imap.example.com';
$hesk_settings['imap_host_port'] = 993;
$hesk_settings['imap_enc']       = 'ssl';
$hesk_settings['imap_keep']      = 0;
$hesk_settings['imap_user']      = 'second-email@example.com';
$hesk_settings['imap_password']  = 'password';
(tip: you can copy the settings from your hesk_settings.php file and just adjust the user and password)

4. save and run the file the same as you do the original one

Requires some manual labor, but it works :)

Re: Multiple email accounts working within Hesk

Posted: Thu Aug 25, 2022 9:55 am
by jfarr2022
Great, but if I had 3 email addresses for example, I would need a copy of this file for each email account?

Re: Multiple email accounts working within Hesk

Posted: Thu Aug 25, 2022 10:25 am
by Klemen
Correct

Re: Multiple email accounts working within Hesk

Posted: Sun Dec 10, 2023 3:30 am
by rahulsingh
Do I need to setup any cronjob after creating 3 different files? Or just leave normally.

Re: Multiple email accounts working within Hesk

Posted: Sun Dec 10, 2023 9:31 am
by Klemen
Each file needs a cron job.