salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.34k stars 2.05k forks source link

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

Open JackBuchanan opened 1 year ago

JackBuchanan commented 1 year ago

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

SuiteBot commented 7 months ago

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

glharitha7 commented 1 month ago

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

This is not working