show communication protocol from shop
# Conflicts: # views/twig/admin/mailConfigCheck.html.twig
This commit is contained in:
parent
2af6727797
commit
37839b269c
@ -33,6 +33,7 @@ class MailConfigCheck extends AdminDetailsController
|
|||||||
{
|
{
|
||||||
$this->checkDataAreSet();
|
$this->checkDataAreSet();
|
||||||
$this->addTplParam('shop', Registry::getConfig()->getActiveShop());
|
$this->addTplParam('shop', Registry::getConfig()->getActiveShop());
|
||||||
|
$this->addTplParam('recipient', $this->testMailAddress);
|
||||||
|
|
||||||
return parent::render();
|
return parent::render();
|
||||||
}
|
}
|
||||||
@ -74,13 +75,31 @@ 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($this->testMailAddress);
|
$mail->setRecipient(
|
||||||
|
trim(Registry::getRequest()->getRequestEscapedParameter('recipient')) ?: $this->testMailAddress
|
||||||
|
);
|
||||||
$mail->setBody('.');
|
$mail->setBody('.');
|
||||||
$mail->setFrom($shop->getFieldData('oxowneremail'));
|
$mail->setFrom($shop->getFieldData('oxowneremail'));
|
||||||
|
|
||||||
|
$currentDebug = $config->getConfigParam('iDebug');
|
||||||
|
$config->setConfigParam('iDebug', 6);
|
||||||
|
$mail->setSmtp();
|
||||||
|
|
||||||
|
ob_start();
|
||||||
$mail->send();
|
$mail->send();
|
||||||
|
$communication = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
$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('mailer', $mail->getMailer());
|
||||||
|
$this->addTplParam('communication', $communication);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Registry::getUtilsView()->addErrorToDisplay($e);
|
Registry::getUtilsView()->addErrorToDisplay($e);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,14 @@
|
|||||||
span.btn {
|
span.btn {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.communicationoutput {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
max-height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
[{assign var="readonly" value="readonly disabled"}]
|
[{assign var="readonly" value="readonly disabled"}]
|
||||||
@ -52,11 +60,16 @@
|
|||||||
[{oxmultilang ident="D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC"}]
|
[{oxmultilang ident="D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC"}]
|
||||||
[{/if}]
|
[{/if}]
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 communicationoutput">
|
||||||
|
[{$communication}]
|
||||||
|
</div>
|
||||||
[{else}]
|
[{else}]
|
||||||
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
|
<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
|
||||||
[{$oViewConf->getHiddenSid()}]
|
[{$oViewConf->getHiddenSid()}]
|
||||||
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
|
<input type="hidden" name="cl" value="[{$oViewConf->getActiveClassName()}]">
|
||||||
<input type="hidden" name="fnc" value="checkConfiguration">
|
<input type="hidden" name="fnc" value="checkConfiguration">
|
||||||
|
<input type="hidden" name="recipient" value="[{$recipient}]">
|
||||||
<button type="submit" class="btn btn-primary">[{oxmultilang ident="D3_MAILCHECKER_CFGCHECK_STARTCHECK"}]</button>
|
<button type="submit" class="btn btn-primary">[{oxmultilang ident="D3_MAILCHECKER_CFGCHECK_STARTCHECK"}]</button>
|
||||||
</form>
|
</form>
|
||||||
[{/if}]
|
[{/if}]
|
||||||
|
@ -20,7 +20,7 @@ return [
|
|||||||
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER' => 'PhpMailer',
|
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER' => 'PhpMailer',
|
||||||
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER_DESC' => 'Der Versand über den PhpMailer sollte dringend vermieden werden, da solche Mails meist als Spam eingestuft werden. Wenn Sie alle SMTP-Daten eingegeben haben, prüfen Sie mögliche Anmeldeprobleme im SMTP-Check.',
|
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER_DESC' => 'Der Versand über den PhpMailer sollte dringend vermieden werden, da solche Mails meist als Spam eingestuft werden. Wenn Sie alle SMTP-Daten eingegeben haben, prüfen Sie mögliche Anmeldeprobleme im SMTP-Check.',
|
||||||
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP' => 'SMTP',
|
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP' => 'SMTP',
|
||||||
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC' => 'Alles in bester Ordnung. Bitte prüfen Sie noch die nötigen SPF-Einträge für Ihre Domain(s).',
|
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC' => 'Alles in bester Ordnung. Bitte prüfen Sie noch die nötigen Einstellungen im Tab "Authorisierung Check" für Ihre Domain(s).',
|
||||||
'D3_MAILCHECKER_CFGCHECK_STARTCHECK' => 'Konfiguration testen',
|
'D3_MAILCHECKER_CFGCHECK_STARTCHECK' => 'Konfiguration testen',
|
||||||
|
|
||||||
'D3_MAILCHECKER_SMTPCHECK_DESC1' => 'Wenn trotz passend eingegebenen Daten kein Mailversand über SMTP erfolgt, kann hier der Anmeldeversuch am Postausgangsserver nachvollzogen werden. Eventuell auftretende Meldungen werden gezeigt.',
|
'D3_MAILCHECKER_SMTPCHECK_DESC1' => 'Wenn trotz passend eingegebenen Daten kein Mailversand über SMTP erfolgt, kann hier der Anmeldeversuch am Postausgangsserver nachvollzogen werden. Eventuell auftretende Meldungen werden gezeigt.',
|
||||||
|
@ -15,7 +15,7 @@ return [
|
|||||||
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER" => "PhpMailer",
|
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER" => "PhpMailer",
|
||||||
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER_DESC" => "Sending via PhpMailer should be avoided as such emails are usually classified as spam. Once you have entered all SMTP data, check possible login problems in the SMTP check.",
|
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER_DESC" => "Sending via PhpMailer should be avoided as such emails are usually classified as spam. Once you have entered all SMTP data, check possible login problems in the SMTP check.",
|
||||||
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP" => "SMTP",
|
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP" => "SMTP",
|
||||||
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC" => "Everything is fine. Please check the necessary SPF entries for your domain(s).",
|
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC" => "Everything is fine. Please check the necessary settings for your domain(s) in the \"Authentication Check\" tab .",
|
||||||
"D3_MAILCHECKER_CFGCHECK_STARTCHECK" => "Test configuration",
|
"D3_MAILCHECKER_CFGCHECK_STARTCHECK" => "Test configuration",
|
||||||
"D3_MAILCHECKER_SMTPCHECK_DESC1" => "If no mail is sent via SMTP despite the appropriate data entered, the attempt to log in to the outgoing mail server can be repeated here. Any messages that may occur are shown.",
|
"D3_MAILCHECKER_SMTPCHECK_DESC1" => "If no mail is sent via SMTP despite the appropriate data entered, the attempt to log in to the outgoing mail server can be repeated here. Any messages that may occur are shown.",
|
||||||
"D3_MAILCHECKER_SMTPCHECK_DESC2" => "New connections can also be tested here in advance.",
|
"D3_MAILCHECKER_SMTPCHECK_DESC2" => "New connections can also be tested here in advance.",
|
||||||
|
Loading…
Reference in New Issue
Block a user