Hello,
I have the following problem: when an admin responds to a ticket request, the user receives an email in Outlook with the corresponding response from the admin. When the user replies directly to this email in Outlook, the comment field of the respective ticket shows the user's reply along with their Outlook signature. This makes the comment thread in the ticket quite cluttered. How can I hide the signatures so that the user can still reply directly to ticket notifications via Outlook, but in the ticket's comment thread, only the actual message of the user is displayed without their signature? The comment field in the ticket form is generated by the HTML tag <comments/>
.
I already tried it with the following code which I found online but it doesn't work.
fd.spRendered(function() {
var commentsField = document.querySelector('comments');
if (commentsField) {
var emailContent = commentsField.innerHTML;
function removeSignature(emailContent) {
var signatureIndex = emailContent.indexOf('Freundliche Grüße');
//'Freundliche Grüße' is the beginning of the signatures
if (signatureIndex !== -1) {
return emailContent.substring(0, signatureIndex).trim();
}
return emailContent;
}
var cleanEmailContent = removeSignature(emailContent);
commentsField.innerHTML = cleanEmailContent;
}
});
Thanks, Yücel