NEW add hook in send mail
This commit is contained in:
parent
6ef0b8e330
commit
25842b3295
@ -366,13 +366,26 @@ class CMailFile
|
|||||||
*/
|
*/
|
||||||
function sendfile()
|
function sendfile()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf,$db;
|
||||||
|
|
||||||
$errorlevel=error_reporting();
|
$errorlevel=error_reporting();
|
||||||
error_reporting($errorlevel ^ E_WARNING); // Desactive warnings
|
error_reporting($errorlevel ^ E_WARNING); // Desactive warnings
|
||||||
|
|
||||||
$res=false;
|
$res=false;
|
||||||
|
|
||||||
|
dol_include_once('/core/class/hookmanager.class.php');
|
||||||
|
$hookmanager=new HookManager($db);
|
||||||
|
$hookmanager->initHooks(array('maildao'));
|
||||||
|
$reshook=$hookmanager->executeHooks('doactions',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if (!empty($reshook))
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->error="Error in hook maildao doactions ".$reshook;
|
||||||
|
dol_syslog("CMailFile::sendfile: mail end error=".$this->error, LOG_ERR);
|
||||||
|
|
||||||
|
return $reshook;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS))
|
if (empty($conf->global->MAIN_DISABLE_ALL_MAILS))
|
||||||
{
|
{
|
||||||
// Action according to choosed sending method
|
// Action according to choosed sending method
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user