* @return mixed
* @see Mail::factory
*/
- public static function alterMail(&$mailer, $driver, $params) {
+ public static function alterMailer(&$mailer, $driver, $params) {
return self::singleton()
->invoke(3, $mailer, $driver, $params, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_alterMailer');
}
+ /**
+ * Deprecated: Misnamed version of alterMailer(). Remove post-4.7.x.
+ * Modify or replace the Mailer object used for outgoing mail.
+ *
+ * @param object $mailer
+ * The default mailer produced by normal configuration; a PEAR "Mail" class (like those returned by Mail::factory)
+ * @param string $driver
+ * The type of the default mailer (eg "smtp", "sendmail", "mock", "CRM_Mailing_BAO_Spool")
+ * @param array $params
+ * The default mailer config options
+ *
+ * @return mixed
+ * @see Mail::factory
+ * @deprecated
+ */
+ public static function alterMail(&$mailer, $driver, $params) {
+ return CRM_Utils_Hook::alterMailer($mailer, $driver, $params);
+ }
+
/**
* This hook is called while building the core search query,
* so hook implementers can provide their own query objects which alters/extends core search.
else {
$mailer = Mail::factory($driver, $params);
}
- CRM_Utils_Hook::alterMail($mailer, $driver, $params);
+ CRM_Utils_Hook::alterMailer($mailer, $driver, $params);
return $mailer;
}