mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
add hook for sending mail (Closes #419)
This commit is contained in:
parent
2455dd916c
commit
1375b4bf42
|
@ -129,7 +129,16 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
||||||
} else {
|
} else {
|
||||||
$mail = Mail::factory('mail', $mail_params);
|
$mail = Mail::factory('mail', $mail_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($GLOBALS['SEEDDMS_HOOKS']['mailqueue'])) {
|
||||||
|
foreach($GLOBALS['SEEDDMS_HOOKS']['mailqueue'] as $queueService) {
|
||||||
|
if(method_exists($queueService, 'queueMailJob')) {
|
||||||
|
$ret = $queueService->queueMailJob($mail_params, $to, $headers, getMLText($subject, $params, "", $lang), $message);
|
||||||
|
if($ret !== null)
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$result = $mail->send($to, $headers, $message);
|
$result = $mail->send($to, $headers, $message);
|
||||||
if (PEAR::isError($result)) {
|
if (PEAR::isError($result)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user