mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
dont try to send if there is no smtpAccount
This commit is contained in:
parent
43f9e501a6
commit
9954438afc
@ -444,6 +444,11 @@ class egw_mailer extends Horde_Mime_Mail
|
||||
try
|
||||
{
|
||||
$smtpAcc = emailadmin_account::get_default(true,false,false);
|
||||
if (!$smtpAcc)
|
||||
{
|
||||
error_log(__METHOD__.__LINE__.'#'." Error: no SMTP Account available for ".__METHOD__);
|
||||
return false;
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.'#'.array2string($smtpAcc));
|
||||
$mail = new egw_mailer($smtpAcc);
|
||||
$method = array();
|
||||
@ -493,7 +498,7 @@ class egw_mailer extends Horde_Mime_Mail
|
||||
}
|
||||
}
|
||||
|
||||
$mail->setFrom($from, $FromName);
|
||||
$mail->setFrom($from, $FromName);
|
||||
$mail->addHeader('Subject', trim($subject)); // trim the subject to avoid strange wrong encoding problem
|
||||
if ($sender) $mail->addHeader('Return-Path', '<'.$sender.'>', true);
|
||||
if ($msgtype) $mail->addHeader('X-eGW-Type',$msgtype);
|
||||
|
Loading…
Reference in New Issue
Block a user