diff --git a/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php b/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php index d3b9618..4de9fc9 100644 --- a/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php +++ b/de.systopia.civiproxy/CRM/Civiproxy/Mailer.php @@ -17,12 +17,23 @@ class CRM_Civiproxy_Mailer { * this is the orginal, wrapped mailer */ protected $mailer = NULL; + /** + * @var Mail Driver + */ + protected $driver = NULL; + + /** + * @var array Mail Params, currently not used + */ + protected $params = []; /** * construct this mailer wrapping another one */ - public function __construct($mailer) { + public function __construct($mailer, $driver, $params) { $this->mailer = $mailer; + $this->driver = $driver; + $this->params = $params; } /** @@ -81,4 +92,11 @@ class CRM_Civiproxy_Mailer { $value = preg_replace("#{$system_base}civicrm/mailing/{$function}#i", $new_url, $value); } } + + /** + * @return Mail|null + */ + public function getDriver() { + return $this->driver; + } } diff --git a/de.systopia.civiproxy/civiproxy.php b/de.systopia.civiproxy/civiproxy.php index a6a5679..a368693 100644 --- a/de.systopia.civiproxy/civiproxy.php +++ b/de.systopia.civiproxy/civiproxy.php @@ -15,7 +15,7 @@ require_once 'civiproxy.civix.php'; * so we can mend all the URLs in outgoing emails */ function civiproxy_civicrm_alterMailer(&$mailer, $driver, $params) { - $mailer = new CRM_Civiproxy_Mailer($mailer); + $mailer = new CRM_Civiproxy_Mailer($mailer, $driver, $params); } /**