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

Enhancements to "FROM email addresses"

    Details

    • Type: New Feature
    • Status: Reopened
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.25
    • Fix Version/s: 4.7.30
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      This was developed from a client requirement to only allow sending email from the organisation from addresses, not from individual logged in account email addresses.  Initially I used the extension https://github.com/CiviCooP/org.civicoop.protectfromaddress to do this.  However, it became clear that this only works on certain forms.  Extending the list of forms (to around 20) helps in most cases but not all.  I then investigated the code in core and discovered a number of places where the same code was basically duplicated instead of being shared.  So this patch does the following:

      1) Clean up all duplicated "FROM email address" code into a shared function in CRM_Core_BAO_Email.

      2) Add a setting in that shared function that decides whether to load logged in contact email addresses or not.  (Currently setting is located in "Outbound Email", but don't really mind where it goes if there's a better place).

      3) Remove "FROM email address" setting from organizational contact settings as it just gets/sets the first one listed in "FROM email addresses" settings page and it's always confused me as to what the difference was (there is no difference).

      4) Add "FROM email address" select to the PDF letter task (for consistency with all other tasks, previously this one was hardcoded to take the first address in the generated array of FROM addresses).

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              mattwire Matthew Wire
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: