CRM-6953 Change bin/UpdateMembershipRecord.php to use FROM email address defined in civicrm.settings.php

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.4.0
    • Component/s: CiviMember
    • Labels:
      None

      Description

      Update the code in bin/UpdateMembershipRecord.php to use a FROM email address defined in civicrm.settings.php.

      This improvement would reduce the number of steps required during an upgrade, and would help make civicrm more friendly to Drupal multi-site installations (where more than one Drupal install is using the CiviCRM codebase and would need different FROM addresses).

      1. Changes required in bin/UpdateMembershipRecord.php:
      a. Remove line 218 ($from =...)
      b. Change line 219 so $from becomes CIVICRM_FROM_ADDRESS

      2. Add the following to civicrm.settings.php:
      // set FROM email address for membership reminder emails
      define(CIVICRM_FROM_ADDRESS,'EMAIL@FIXME.ORG');

      3. Change CiviCRM Upgrade instructions to remove need to update FROM address

        Attachments

          Activity

          [CRM-6953] Change bin/UpdateMembershipRecord.php to use FROM email address defined in civicrm.settings.php
          Donald A. Lobo added a comment -

          rather than introducing yet another setting, we should use the "default" from email address we use when sending an email with civicrm and civimail:

          http://drupal.demo.civicrm.org/civicrm/admin/options/from_email&group=from_email_address&reset=1

          if you can create a patch and use the above, we can get this into 3.3

          Austin Mroczek added a comment -

          I'll work on a patch. May take a few days to figure out.

          Austin Mroczek added a comment -

          The attached patch works for me in CiviCRM 3.2.3 on Drupal 6.

          This is only my second patch to CiviCRM, so I don't know if it's the best use of the core functions and I welcome any thoughts on that.

          I was originally looking at CRM_Core_OptionGroup::values( 'from_email_address' ) but it would not tell me which address is the default one in the case where more than one address was entered.

          Donald A. Lobo added a comment -

          austin:

          apologies on sending u on a wild goose chase. i just checked the 3.3 code base to integrate this issue and realized we've already fixed it and extract the from address in a similar manner

          Can u check the code and do a quick QA on it:

          http://svn.civicrm.org/civicrm/branches/v3.3/bin/UpdateMembershipRecord.php.txt

          Donald A. Lobo added a comment -


          This has already been fixed

            People

            • Assignee:
              Donald A. Lobo
              Reporter:
              Austin Mroczek

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified