Page 1 of 1

change subject style-text

Posted: Fri Jan 28, 2022 10:10 pm
by xep22
hi,

I want to change the subject of emails in the text file:

Code: Select all

$hesklang['new_reply_by_staff']='[#%%TRACK_ID%%] New answer: %%SUBJECT%%';
to something like:

Code: Select all

$hesklang['new_reply_by_staff']='[#XX-Support %%TRACK_ID%%] New answer: %%SUBJECT%%';
problem is, with this change, if the customer answer to a email, he will create a new ticket instead of answer to the ticket. looks like HESK search for "[#%%TRACK_ID%%]" in the subject to determine if its a answer or new ticket.

Is is possible to change the subject style ? how ?

Re: change subject style-text

Posted: Sat Jan 29, 2022 7:42 am
by Klemen
Hesk indeed requires [#%%TRACK_ID%%] in the subject to detect the response.

If you want to change that, you will need to adjust regex search in hesk_email2ticket function inside /inc/pipe_fiunctions.inc.php (consult a PHP developer if not sure how).

Re: change subject style-text

Posted: Sun Jan 30, 2022 10:52 am
by xep22
can someone help me with this ? should bei easy... this works but I need a space between my text and ticket ID.

Code: Select all

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