don't use iDebug = 6 for getting SMTP logs because of different error handling
This commit is contained in:
parent
b3150cfa60
commit
f7f9c28b53
@ -74,7 +74,6 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$shop = Registry::getConfig()->getActiveShop();
|
$shop = Registry::getConfig()->getActiveShop();
|
||||||
$config = Registry::getConfig();
|
|
||||||
|
|
||||||
$mail = oxNew(Email::class);
|
$mail = oxNew(Email::class);
|
||||||
$mail->setRecipient(
|
$mail->setRecipient(
|
||||||
@ -83,8 +82,7 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
$mail->setBody('.');
|
$mail->setBody('.');
|
||||||
$mail->setFrom($shop->getFieldData('oxowneremail'));
|
$mail->setFrom($shop->getFieldData('oxowneremail'));
|
||||||
|
|
||||||
$currentDebug = $config->getConfigParam('iDebug');
|
$mail->set("SMTPDebug", true); // don't set via iDebug = 6 because different handling
|
||||||
$config->setConfigParam('iDebug', 6);
|
|
||||||
$mail->setSmtp();
|
$mail->setSmtp();
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
@ -95,8 +93,6 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
$re = '/(^|\<br\>)(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s)/m';
|
$re = '/(^|\<br\>)(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s)/m';
|
||||||
$subst = "$1";
|
$subst = "$1";
|
||||||
$communication = preg_replace($re, $subst, $communication);
|
$communication = preg_replace($re, $subst, $communication);
|
||||||
|
|
||||||
$config->setConfigParam('iDebug', $currentDebug);
|
|
||||||
$this->addTplParam('mailer', $mail->getMailer());
|
$this->addTplParam('mailer', $mail->getMailer());
|
||||||
$this->addTplParam('communication', $communication);
|
$this->addTplParam('communication', $communication);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user