Page 1 of 1
Need to Stop Hesk from replying to certain email addresses
Posted: Sun Oct 02, 2011 5:46 pm
by Lisaweb
Version of script: 2.3
What terms did you try when SEARCHING for a solution: stop reply, prevent reply, prevent email
Write your message below:
Hi all,
We have certain emails that are automatically piped into Hesk, where we do not want Hesk to send any ticket replies to the "customer".
Example: We have an online fax service that emails us .pdf's of faxed orders sent to us, and we have them piped into Hesk. But we don't want Hesk to send them a ticket reply, as the fax service has nothing to do with the fax, they just email it to us as a service.
How can I get Hesk to
not reply to certain email addresses? I am willing to hard code this in, if need be.
Thanks for any help you can provide!

Re: Need to Stop Hesk from replying to certain email address
Posted: Mon Oct 03, 2011 12:41 pm
by Klemen
The easiest way would be to add something like this
Code: Select all
if ($to == 'donotreply@yourdomain.com')
{
return true;
}
to the top of the hesk_mail function in the inc/email_functions.inc.php file.
Re: Need to Stop Hesk from replying to certain email address
Posted: Mon Oct 03, 2011 2:04 pm
by Lisaweb
Thanks Klemen! I'm just leaning PHP, so let me guess. If I want to add more email addresses to this routine, I would do this?
Code: Select all
if ($to == 'donotreply@yourdomain.com,donotreply@website.com,noreply@site.com')
{
return true;
}
Or would I need to do each of them separately, like this?
Code: Select all
if ($to == 'donotreply@yourdomain.com')
{
return true;
}
if ($to == 'donotreply@website.com')
{
return true;
}
if ($to == 'noreply@site.com')
{
return true;
}
Again, thanks!
Klemen wrote:The easiest way would be to add something like this
Code: Select all
if ($to == 'donotreply@yourdomain.com')
{
return true;
}
to the top of the hesk_mail function in the inc/email_functions.inc.php file.
Re: Need to Stop Hesk from replying to certain email address
Posted: Mon Oct 03, 2011 2:18 pm
by Klemen
You would have to use the second code.
Or, alternatively, use an array like this:
Code: Select all
$block_these = array('one@one.com','two@two.com','three@three.com');
if (in_array($to,$block_these))
{
return true;
}
BUT the purpose of this forum is not teaching PHP, so you might want to try a PHP tutorial or
PHP book instead

Re: Need to Stop Hesk from replying to certain email address
Posted: Mon Oct 03, 2011 2:47 pm
by Lisaweb
Aw, well thank for being patient with a newbie like me then.
I am trying to study it, but at my job I wear so many hats I've very little time to learn. Very frustrating. That's why I am excited that this new ticket system of yours will keep track of all the company and customer correspondence in an orderly manner, so I can gain back that hour a day I spend searching my email for stuff. lol
Thanks again for your awesome script. Now I am going to go and buy you a beer....
Klemen wrote:You would have to use the second code.
Or, alternatively, use an array like this:
Code: Select all
$block_these = array('one@one.com','two@two.com','three@three.com');
if (in_array($to,$block_these))
{
return true;
}
BUT the purpose of this forum is not teaching PHP, so you might want to try a PHP tutorial or
PHP book instead

Re: Need to Stop Hesk from replying to certain email address
Posted: Tue Oct 04, 2011 2:58 pm
by Klemen
Thanks for the bee... emmm, mineral water
