Closed danielmorlock closed 8 years ago
The plugin hook "message_outgoing_headers" is deprecated and should be replaced with "message_before_send". Patch proposal:
@@ -23,7 +23,7 @@ $this->include_script('identity_smtp.js'); $this->add_texts('localization/', true); - $this->add_hook('message_outgoing_headers', array($this, 'messageOutgoingHeaders')); + $this->add_hook('message_before_send', array($this, 'messageBeforeSend')); $this->add_hook('smtp_connect', array($this, 'smtpWillConnect')); $this->add_hook('identity_form', array($this, 'identityFormWillBeDisplayed')); $this->add_hook('identity_create', array($this, 'identityWasCreated')); @@ -169,15 +167,14 @@ return false; } - function messageOutgoingHeaders($args) + function messageBeforeSend($args) { $identities = rcmail::get_instance()->user->list_identities(); foreach ($identities as $idx => $ident) { - if ($identities[$idx]['email'] == $args['headers']['X-Sender']) { + if ($identities[$idx]['email'] == $args['from']) { $this->from_identity = $identities[$idx]['identity_id']; } } - return $args; }
Can you open a pull request? And maybe add a link to the deprecation notice.
Here you go: https://github.com/elm/Roundcube-SMTP-per-Identity-Plugin/pull/12
Closed with #12
The plugin hook "message_outgoing_headers" is deprecated and should be replaced with "message_before_send". Patch proposal: