mailer: return 0 if plugin requested to stop (-1)

This commit is contained in:
Andrew Dolgov 2018-11-22 16:39:10 +03:00
parent 6b19eec0f7
commit ac5e55c2bd
1 changed files with 4 additions and 1 deletions

View File

@ -30,8 +30,11 @@ class Mailer {
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SEND_MAIL) as $p) {
$rc = $p->hook_send_mail($this, $params);
if ($rc == 1 || $rc == -1)
if ($rc == 1)
return $rc;
if ($rc == -1)
return 0;
}
$headers[] = "From: $from_combined";