answers from hotmail accounts corrupts the ticket id

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
aiacciu
Posts: 3
Joined: Wed Nov 20, 2013 10:43 pm

answers from hotmail accounts corrupts the ticket id

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

Re: answers from hotmail accounts corrupts the ticket id

Post 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 "-"
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
aiacciu
Posts: 3
Joined: Wed Nov 20, 2013 10:43 pm

Re: answers from hotmail accounts corrupts the ticket id

Post 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
aiacciu
Posts: 3
Joined: Wed Nov 20, 2013 10:43 pm

Re: answers from hotmail accounts corrupts the ticket id

Post 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
Post Reply