Page 1 of 1

answers from hotmail accounts corrupts the ticket id

Posted: Wed Nov 20, 2013 10:57 pm
by aiacciu
Version of script: 2.52
What terms did you try when SEARCHING for a solution: hotmail

Hello,

I use email piping and it works perfect.
However when customers from hotmail.fr reply to a ticket, the subject is corrupted and thus a new ticket is created.

example
Détails de la demande :
Auteur : laetitia blondin
Référence : G8T-NHA-VMS2

Sujet de la demande : RE: [#JPQ- QET-7ZYM] Nouvelle r éponse : R E: [#WMQ- 8V9-PWEE] No
The original ticket was [#WMQ-8V9-PWEE], the first answer set a new ticket [#JPQ-QET-7ZYM] and the latest is G8T-NHA-VMS2.
Note that hotmail.fr seems to add a space after the first "-" of the tracking number. Original tracking in the subject is [#WMQ-<space><space>8V9-PWEE]

Note that other spaces are added r<space>éponse : R<space>E

Is there anything we can do?

Thanks

Marc

Re: answers from hotmail accounts corrupts the ticket id

Posted: Thu Nov 21, 2013 10:03 am
by Klemen
Not sure why hotmail does that, but you can try this:

1. open "inc/pipe_functions.inc.php" in a text editor

2. Replace this code

Code: Select all

if ( preg_match('/\[#([A-Z0-9]{3}\-[A-Z0-9]{3}\-[A-Z0-9]{4})\]/', $tmpvar['subject'], $matches) )
with this

Code: Select all

if ( preg_match('/\[#([A-Z0-9]{3}\-[ ]{0,2}[A-Z0-9]{3}\-[A-Z0-9]{4})\]/', $tmpvar['subject'], $matches) )
3. save, upload and test

That should ignore empty spaces after the first "-"

Re: answers from hotmail accounts corrupts the ticket id

Posted: Thu Nov 21, 2013 4:18 pm
by aiacciu
Hello,

That's exactly the workaround I was planning to implement in your code. Thank you!

I will let you know if I receive more errors.

Regards

Marc

Re: answers from hotmail accounts corrupts the ticket id

Posted: Sun Dec 08, 2013 4:14 pm
by aiacciu
Hello,

it works for the matching, we should also change the line

from

Code: Select all

 $tmpvar['trackid'] = $matches[1];
to

Code: Select all

 $tmpvar['trackid'] = str_replace(' ', '', $matches[1]);

Regards

Marc