Page 1 of 1

E-mail piping: Reply will create new ticket everytime

Posted: Tue Mar 12, 2019 8:31 am
by Sweritasa
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: "When replying new ticket is created" and "reply will create new ticket"

Write your message below:
Hi guys,
I hope you can help me with this. I'm totally new with Hesk helpdesk software and I was asked to solve this problem.

We have Email piping enabled and every time some user sends us an Email to a specific email address, HESK would create a new ticket. This is all fine.

Problem is, another ticket is created if someone is replying to all and that specific email address is included in the reply message. So we have all these opened tickets that are unnecessary.

I know I can merge tickets, but I want to get rid of this ticket creating.

I found one possible solution here, but I want to ask you guys if this could work.

Post by Klemen ยป Fri Jul 21, 2017, 7:46 am

Try this:

1. backup existing inc/pipe_functions.inc.php file
2. open the file in a powerful text editor that can properly encode files, such as Notepad++
3. Find line
CODE: SELECT ALL

// Process email message, convert to UTF-8
4. just ABOVE that line add
CODE: SELECT ALL

if (strpos($tmpvar['subject'], 'RE:') === 0)
{
return hesk_cleanExit();
}
5. save, upload and test


So the idea is, that it won't create a new ticket if the subject contains "RE:"

I will be grateful for any help.

Thanks in advance and have a nice day,
Simon

Re: E-mail piping: Reply will create new ticket everytime

Posted: Tue Mar 12, 2019 11:14 am
by Klemen
The code you mention will simply discard (ignore) any email with a subject starting with "RE:"

Instead, see my response here:
viewtopic.php?f=13&t=6373

Re: E-mail piping: Reply will create new ticket everytime

Posted: Thu Mar 21, 2019 10:20 am
by Sweritasa
Thank you for answering, I'm really grateful for your help and sorry for late response.

As I understand this will only work for the person who first sent the email and from which ticket was created not if someone else is replying.

Problem is that the user sends an email message and includes multiple people in it so anyone can reply and that's when new tickets are creating.

So there is no way to make this work?

kind regards,
Simon

Re: E-mail piping: Reply will create new ticket everytime

Posted: Sat Mar 23, 2019 12:52 pm
by Klemen
If you delete the code mentioned in the topic I linked to in my previous reply, Hesk will not check if email address matches so a reply should be added from anyone - provided the tracking ID is still in the email subject.