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

New hook implementation for altering outgoing mail configuration

    Details

      Description

      I've implemented a new hook to be used to alter outgoing email settings. It's called in CRM_Core_Config::getMailer(), just before the Mailer object is initialized.

      I'm using the hook for two reasons:

      1. Some hosts in our set use the CiviSMTP-recommended Postfix forwarder, but not all of them can be configured that way.
      2. It was not possible to do this via hook_civicrm_config, since the config settings for mailing_backend are not accessible via the $config singleton.

      I'm using the hook in a 4.1.5 Drupal 7 install, and it works. I'm not yet set up for work against the current CiviCRM trunk, although the patch is against today's 4.3 based trunk. The implementations of CRM_Utils_Hooks and CRM_Core_Config are very similar; I expect that this will work on 4.3, and will not interfere in any way for installations that do not use the hook.

      I include documentation in drupal/civitest.module.sample, and would be happy to add documentation to the 4.3 wiki if the hook is accepted.

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              torenware Rob Thorne
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: