don't use iDebug = 6 for getting SMTP logs because of different error handling

This commit is contained in:
Daniel Seifert 2024-08-01 10:42:41 +02:00
parent b3150cfa60
commit f7f9c28b53

View File

@ -74,7 +74,6 @@ class MailConfigCheck extends AdminDetailsController
{
try {
$shop = Registry::getConfig()->getActiveShop();
$config = Registry::getConfig();
$mail = oxNew(Email::class);
$mail->setRecipient(
@ -83,8 +82,7 @@ class MailConfigCheck extends AdminDetailsController
$mail->setBody('.');
$mail->setFrom($shop->getFieldData('oxowneremail'));
$currentDebug = $config->getConfigParam('iDebug');
$config->setConfigParam('iDebug', 6);
$mail->set("SMTPDebug", true); // don't set via iDebug = 6 because different handling
$mail->setSmtp();
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';
$subst = "$1";
$communication = preg_replace($re, $subst, $communication);
$config->setConfigParam('iDebug', $currentDebug);
$this->addTplParam('mailer', $mail->getMailer());
$this->addTplParam('communication', $communication);
} catch (Exception $e) {