SuiteCRM icon indicating copy to clipboard operation
SuiteCRM copied to clipboard

Email signature is not added in reply to when an email signature has already been added

Open JackBuchanan opened this issue 2 years ago • 2 comments

Issue

Issue 1 - Email signatures are not added when replying to email if an email signature has been added by SuiteCRM already. Issue 2 - Existing email signatures in email thread are replaced on load by SuiteCRM if the email signature has been updated in the user profile, this will cause issues if other applications use the HTML class "email-signature" for their signature as SuiteCRM will replace it with the user who is composing the email. Same issue if two users in SuiteCRM are in an email thread together, the person composing the email will have their email signature replace the other users signature in the email thread.

Expected Behavior

Email signatures should not be changed retroactively and should always be appended where specified in the user profile(Signature above reply)

Actual Behavior

If email signature is already added in the thread then a new signature will not be added and will be replaced by the users current signature.

Possible Fix

Remove code that replaces email signature: modules/Emails/include/ComposeView/EmailsComposeView.js - Line 403

 else if ($(body).hasClass('email-signature')) {
        var newBody = $('<div></div>');
        $(body).appendTo(newBody);
        $(newBody).find('.email-signature').replaceWith(signatureElement[0].outerHTML);
        tinymce.activeEditor.setContent(newBody.html(), {format: 'html'});
      } 

Steps to Reproduce

  1. Set-up outbound email
  2. Add an email signature in the user profile
  3. Send email to inbound mailbox
  4. Update email signature to be different from what was originally set
  5. Check email from within SuiteCRM and "reply to"
  6. See that email signature is now updated and new email signature has not been appended/prepended

Context

Email signatures are not being appended as expected.

Your Environment

  • SuiteCRM Version used: SuiteCRM 7.12.6
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Chrome latest
  • Environment name and version (e.g. MySQL, PHP 7): MySQL, PHP 7.4
  • Operating System and version (e.g Ubuntu 16.04): Ubuntu 20.04

JackBuchanan avatar Aug 30 '22 10:08 JackBuchanan

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/email-signature-not-loading-correctly-or-at-all/91572/2

SuiteBot avatar Jan 18 '24 16:01 SuiteBot

Email signature is not added in reply to when an email signature has already been added #9745 :

This is not working

glharitha7 avatar Jun 25 '24 05:06 glharitha7