mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-25 14:10:28 +01:00
Email send bugfix empty recipients, bugfix IMAP error display
This commit is contained in:
parent
c1727b389e
commit
5c1a5d04df
@ -25671,6 +25671,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
|||||||
$bccRecipients[] = new EmailRecipient($bcc3, $bcc3);
|
$bccRecipients[] = new EmailRecipient($bcc3, $bcc3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($recipients)) {
|
||||||
// This will build the mail with phpmailer 6 and send it out
|
// This will build the mail with phpmailer 6 and send it out
|
||||||
// There is no way to retrieve the created mail e.g. for IMAP output
|
// There is no way to retrieve the created mail e.g. for IMAP output
|
||||||
// This should be migrated to laminas-mail (used for imap)
|
// This should be migrated to laminas-mail (used for imap)
|
||||||
@ -25686,6 +25687,9 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
|||||||
$bccRecipients,
|
$bccRecipients,
|
||||||
$sendmail_error
|
$sendmail_error
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$sendmail_error = "Kein Empfänger angegeben";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($sysMailerSent === false) {
|
if($sysMailerSent === false) {
|
||||||
@ -25742,11 +25746,12 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
|||||||
$client->connect();
|
$client->connect();
|
||||||
$client->appendMessage($imapCopyMessage, $account->getImapOutgoingFolder());
|
$client->appendMessage($imapCopyMessage, $account->getImapOutgoingFolder());
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->app->erp->LogFile("Mailer Error: " . (string) $e);
|
$this->app->erp->LogFile("Mailer IMAP Error: " . (string) $e);
|
||||||
if(isset($this->app->User) && $this->app->User && method_exists($this->app->User, 'GetID'))
|
if(isset($this->app->User) && $this->app->User && method_exists($this->app->User, 'GetID'))
|
||||||
{
|
{
|
||||||
$this->app->erp->InternesEvent($this->app->User->GetID(),"IMAP-Fehler","alert",1);
|
$this->app->erp->InternesEvent($this->app->User->GetID(),"IMAP-Fehler","alert",1);
|
||||||
}
|
}
|
||||||
|
$this->mail_error = "Mailer IMAP Error";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user