Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-5831

Allow users to configure Email Signature(s)

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: CiviCase, Core CiviCRM
    • Labels:
      None

      Description

      Rationale
      ========
      Users who send emails from within CiviCRM have a need to associate a personal 'signature' with the email address(es) associated with their contact record. When using 'Send Email to Contact(s)' - the signature associated with the selected FROM email address gets automatically appended to the email content. Users may want to have different signatures for HTML mail vs. TEXT mail formats (since HTML mail signatures may include logos, links etc.).

      Implementation
      ============
      1. Schema change
      Add 2 columns to civicrm_email table:

      • signature_html - column type = TEXT, default = NULL
      • signature_text - column type = TEXT, default = NULL

      These fields should be importable, exportable and available for profiles.

      2. Contact Edit form:
      2.1 Build form
      We need to add 2 textarea fields for editing the signatures. WYSIWYG (if configured) for Signature (HTML), and plain textarea for Signature (Text). Since we don't want to bloat the default layout, I'd suggest adding a link in a new table cell to the right side of the Email_Block_n rows:

      'Signature'

      Onclick, we inject a table row below the Email_Block row (buildAdditionalBlocks) containing the fields for the two signature formats. HTML first, then Text. (The signature editing rows are always hidden - not loaded - when contact edit form is loaded - user has to click 'Signature' link to view or modify.)

      2.2 Post process
      Form field values are saved to the new signature columns. For the 'Text' format field, we need to make sure line feeds are respected / saved to the DB (pretty sure this is the default behavior, but noting here just in case).

      3. Contact Summary (contact/view)
      If signature(s) are present for a given email, add a link to the right of the email address (small font): '(signature)'.
      Onclick, popup dialog displaying both signatures (read-only, like Activity View pop-up). For 'Text' signature, line feeds s/b converted to <br /> so that the signature displays line breaks properly.

      4. Send Email to Contact(s)
      Most email clients simply inject the signature into the message body when the 'compose' form loads. This is appealing / simple - AND allows the user to see (and change) how the signature integrates with the message body.

      HOWEVER, since the user can change the FROM email address in this form - if they have multiple email addresses - we need to handle this case in some way. Simplest would be to append the signature for the newly selected email address at the end of the message body fields. This may mean 2 signatures in the message until the user fixes it. I don't think we want to clobber existing values in the message fields on change of FROM address - and I also can't think of a way to swap signatures (at least in a text body - in HTML we could use a div id for the signature block and do the swap).

      The other alternatives I can think of are:

      • provide separate form fields to display (and modify) the signature for each format - just below the message body fields OR
      • append the signatures in postProcess - don't display on this form
        I don't really like either alternative - first one seems clunky and second one is just not intuitive and not the way any other mail clients work.

      Open to other ideas

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: