Need to Stop Hesk from replying to certain email addresses

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

Need to Stop Hesk from replying to certain email addresses

Post 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! :-)
- Lisa
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Need to Stop Hesk from replying to certain email address

Post 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.
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
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

Re: Need to Stop Hesk from replying to certain email address

Post 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.
- Lisa
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Need to Stop Hesk from replying to certain email address

Post 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 :wink:
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
Lisaweb
Posts: 94
Joined: Sun Sep 25, 2011 3:23 pm

Re: Need to Stop Hesk from replying to certain email address

Post 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 :wink:
- Lisa
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Need to Stop Hesk from replying to certain email address

Post by Klemen »

Thanks for the bee... emmm, mineral water :wink:
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
Post Reply