Compare commits

...

13 Commits

16 changed files with 116 additions and 67 deletions

View File

@ -4,9 +4,25 @@ $finder = PhpCsFixer\Finder::create()
->in(__DIR__) ->in(__DIR__)
; ;
$fileHeaderComment = <<<EOF
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
https://www.d3data.de
@copyright (C) D3 Data Development (Inh. Thomas Dartsch)
@author D3 Data Development - Daniel Seifert <info@shopmodule.com>
@link https://www.oxidmodule.com
EOF;
$config = new PhpCsFixer\Config(); $config = new PhpCsFixer\Config();
return $config->setRules([ return $config->setRules([
'@PHP73Migration' => true, 'header_comment' => [
'header' => $fileHeaderComment,
'comment_type' => 'PHPDoc',
'location' => 'after_open'
],
'@PHP80Migration' => true,
'@PSR12' => true '@PSR12' => true
]) ])
->setFinder($finder) ->setFinder($finder)

View File

@ -26,7 +26,22 @@ use OxidEsales\Eshop\Core\Registry;
class MailConfigCheck extends AdminDetailsController class MailConfigCheck extends AdminDetailsController
{ {
protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailConfigCheck'; protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailConfigCheck';
protected string $testMailAddress = 'test@example.com'; protected string $testMailAddress = 'test@example.tld';
public function __construct()
{
parent::__construct();
$this->setSmtpCredentials();
}
protected function setSmtpCredentials(): void
{
$shop = Registry::getConfig()->getActiveShop();
$this->addTplParam('smtpHost', $shop->getFieldData('oxsmtp'));
$this->addTplParam('smtpUser', $shop->getFieldData('oxsmtpuser'));
}
public function render(): string public function render(): string
{ {
@ -73,18 +88,16 @@ class MailConfigCheck extends AdminDetailsController
protected function getCurrentMailer(): void protected function getCurrentMailer(): void
{ {
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(
trim(Registry::getRequest()->getRequestEscapedParameter('recipient')) ?: $this->testMailAddress 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'); $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,12 +108,13 @@ 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) {
ob_end_clean();
Registry::getUtilsView()->addErrorToDisplay($e); Registry::getUtilsView()->addErrorToDisplay($e);
} }
restore_error_handler();
} }
} }

View File

@ -46,7 +46,7 @@ class MailTester extends AdminDetailsController
$mail->setFrom($from); $mail->setFrom($from);
$mail->sendEmail($to, $subject, $body); $mail->sendEmail($to, $subject, $body);
$this->addTplParam('success', true); $this->addTplParam('success', true);
} catch ( Exception $e) { } catch (Exception $e) {
Registry::getUtilsView()->addErrorToDisplay(nl2br($e->getMessage())); Registry::getUtilsView()->addErrorToDisplay(nl2br($e->getMessage()));
} }
} }

View File

@ -44,7 +44,18 @@ class SmtpChecker extends AdminDetailsController
{ {
parent::__construct(); parent::__construct();
/** @var Shop $activeShop */ $this->setSmtpCredentials();
$this->from = Registry::getRequest()->getRequestEscapedParameter('from') ?: '';
$this->addTplParam('from', $this->from);
$this->to = Registry::getRequest()->getRequestEscapedParameter('to') ?: '';
$this->addTplParam('recipient', $this->to);
$this->addTplParam('sendMail', Registry::getRequest()->getRequestEscapedParameter('sendmail'));
$this->addTplParam('smtpLog', $this->log);
}
protected function setSmtpCredentials(): void
{
$activeShop = Registry::getConfig()->getActiveShop(); $activeShop = Registry::getConfig()->getActiveShop();
if ($localHost = Registry::getRequest()->getRequestEscapedParameter('smtpHost')) { if ($localHost = Registry::getRequest()->getRequestEscapedParameter('smtpHost')) {
@ -53,20 +64,13 @@ class SmtpChecker extends AdminDetailsController
['host' => $shopHost, 'port' => $shopPort] = parse_url(trim($activeShop->getFieldData('oxsmtp'))); ['host' => $shopHost, 'port' => $shopPort] = parse_url(trim($activeShop->getFieldData('oxsmtp')));
} }
$this->host = $shopHost; $this->host = $shopHost ?? '';
$this->addTplParam('smtpHost', Registry::getRequest()->getRequestEscapedParameter('smtpHost')); $this->addTplParam('smtpHost', Registry::getRequest()->getRequestEscapedParameter('smtpHost'));
$this->port = $shopPort; $this->port = $shopPort ?? 587;
$this->user = Registry::getRequest()->getRequestEscapedParameter('smtpUser') ?: $activeShop->getFieldData('oxsmtpuser'); $this->user = Registry::getRequest()->getRequestEscapedParameter('smtpUser') ?: $activeShop->getFieldData('oxsmtpuser');
$this->addTplParam('smtpUser', $this->user); $this->addTplParam('smtpUser', $this->user);
$this->pwd = Registry::getRequest()->getRequestEscapedParameter('smtpPwd') ?: $activeShop->getFieldData('oxsmtppwd'); $this->pwd = Registry::getRequest()->getRequestEscapedParameter('smtpPwd') ?: $activeShop->getFieldData('oxsmtppwd');
$this->addTplParam('smtpPwd', $this->pwd); $this->addTplParam('smtpPwd', $this->pwd);
$this->from = Registry::getRequest()->getRequestEscapedParameter('from') ?: '';
$this->addTplParam('from', $this->from);
$this->to = Registry::getRequest()->getRequestEscapedParameter('to') ?: '';
$this->addTplParam('recipient', $this->to);
$this->addTplParam('sendMail', Registry::getRequest()->getRequestEscapedParameter('sendmail'));
$this->addTplParam('smtpLog', $this->log);
} }
public function getTemplateName(): string public function getTemplateName(): string

View File

@ -81,7 +81,7 @@ class SpfChecker extends AdminDetailsController
function ($mailAddress) { function ($mailAddress) {
$mailAddress = trim($mailAddress); $mailAddress = trim($mailAddress);
try { try {
if ( ! str_contains( $mailAddress, '@' ) ) { if (! str_contains($mailAddress, '@')) {
throw oxNew(InvalidArgumentException::class); throw oxNew(InvalidArgumentException::class);
} }
$addressChunks = explode('@', $mailAddress); $addressChunks = explode('@', $mailAddress);
@ -107,7 +107,7 @@ class SpfChecker extends AdminDetailsController
$query = new Query('', $domain); $query = new Query('', $domain);
$result = $checker->getResult($query); $result = $checker->getResult($query);
$status = match ( $result->getResult() ) { $status = match ($result->getResult()) {
Result::FAIL, Result::NEUTRAL, Result::PASS, Result::SOFTFAIL => SpfResult::SET, Result::FAIL, Result::NEUTRAL, Result::PASS, Result::SOFTFAIL => SpfResult::SET,
Result::NONE => SpfResult::MISSING, Result::NONE => SpfResult::MISSING,
default => SpfResult::ERROR, default => SpfResult::ERROR,
@ -122,7 +122,7 @@ class SpfChecker extends AdminDetailsController
public function getSpfStatusColor(SpfResult $result): string public function getSpfStatusColor(SpfResult $result): string
{ {
return match ( $result->getStatus() ) { return match ($result->getStatus()) {
SpfResult::SET => 'success', SpfResult::SET => 'success',
SpfResult::ERROR => 'warning', SpfResult::ERROR => 'warning',
default => 'danger', default => 'danger',
@ -136,21 +136,21 @@ class SpfChecker extends AdminDetailsController
$query = new Query('', $domain); $query = new Query('', $domain);
$record = $check->getResult($query)->getRecord(); $record = $check->getResult($query)->getRecord();
$status = match ( $record->getRejectPolicy()->getValue() ) { $status = match ($record->getRejectPolicy()->getValue()) {
DMARCResult::REJECT_QUARANTINE, DMARCResult::REJECT_REJECT => OxDmarcResult::SET, DMARCResult::REJECT_QUARANTINE, DMARCResult::REJECT_REJECT => OxDmarcResult::SET,
DMARCResult::REJECT_NONE => OxDmarcResult::MISSING, DMARCResult::REJECT_NONE => OxDmarcResult::MISSING,
default => OxDmarcResult::ERROR, default => OxDmarcResult::ERROR,
}; };
$summarize[$domain] = oxNew( OxDmarcResult::class, $status, $record->getRawRecord()); $summarize[$domain] = oxNew(OxDmarcResult::class, $status, $record->getRawRecord());
} catch ( LogicException) { } catch (LogicException) {
$summarize[$domain] = oxNew( OxDmarcResult::class, OxDmarcResult::MISSING, ''); $summarize[$domain] = oxNew(OxDmarcResult::class, OxDmarcResult::MISSING, '');
} }
} }
public function getDmarcStatusColor(OxDmarcResult $result): string public function getDmarcStatusColor(OxDmarcResult $result): string
{ {
return match ( $result->getStatus() ) { return match ($result->getStatus()) {
SpfResult::SET => 'success', SpfResult::SET => 'success',
SpfResult::ERROR => 'warning', SpfResult::ERROR => 'warning',
default => 'danger', default => 'danger',

View File

@ -18,4 +18,4 @@ namespace D3\MailConfigChecker\Application\Model;
class Constants class Constants
{ {
public const OXID_MODULE_ID = 'd3mailconfigchecker'; public const OXID_MODULE_ID = 'd3mailconfigchecker';
} }

View File

@ -21,8 +21,8 @@ class DmarcResult
public const MISSING = 'missing'; public const MISSING = 'missing';
public const ERROR = 'error'; public const ERROR = 'error';
protected $status; protected string $status;
protected $record; protected ?string $record;
public function __construct(string $status, ?string $record = null) public function __construct(string $status, ?string $record = null)
{ {

View File

@ -27,7 +27,7 @@ class d3TranslatableLazyAssertionException extends LazyAssertionException
$i = 1; $i = 1;
foreach ($errors as $error) { foreach ($errors as $error) {
$message .= sprintf("%d) %s: %s\n", $i ++, $error->getPropertyPath(), $error->getMessage()); $message .= sprintf("%d) %s: %s\n", $i++, $error->getPropertyPath(), $error->getMessage());
} }
return new LazyAssertionException($message, $errors); return new LazyAssertionException($message, $errors);

View File

@ -30,8 +30,8 @@ return [
'D3_MAILCHECKER_ASSERTIONS_NOTSET' => 'ist nicht (richtig) gesetzt', 'D3_MAILCHECKER_ASSERTIONS_NOTSET' => 'ist nicht (richtig) gesetzt',
'D3_MAILCHECKER_ASSERTIONS_NOPORT' => 'fehlende oder falsche Port-Angabe (587 oder 2525)', 'D3_MAILCHECKER_ASSERTIONS_NOPORT' => 'fehlende oder falsche Port-Angabe (587 oder 2525)',
'D3_MAILCHECKER_CFGCHECK_SHOPSEND' => 'Der Shop verschickt Mails über', 'D3_MAILCHECKER_CFGCHECK_SHOPSEND' => 'Der Shop verschickt Mails über',
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER' => 'PhpMailer', 'D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER' => 'PHP Mailfunktion',
'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 die PHP-eigene Mailfunktion 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 Einstellungen im Tab "Authorisierung Check" 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',

View File

@ -25,8 +25,8 @@ return [
"D3_MAILCHECKER_ASSERTIONS_NOTSET" => "is not (correctly) set", "D3_MAILCHECKER_ASSERTIONS_NOTSET" => "is not (correctly) set",
"D3_MAILCHECKER_ASSERTIONS_NOPORT" => "missing or incorrect port information (587 or 2525)", "D3_MAILCHECKER_ASSERTIONS_NOPORT" => "missing or incorrect port information (587 or 2525)",
"D3_MAILCHECKER_CFGCHECK_SHOPSEND" => "The shop sends emails via", "D3_MAILCHECKER_CFGCHECK_SHOPSEND" => "The shop sends emails via",
"D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER" => "PhpMailer", "D3_MAILCHECKER_CFGCHECK_SHOPSEND_PHPMAILER" => "PHP mail function",
"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 PHP's integrated mail function 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 settings for your domain(s) in the \"Authentication Check\" tab .", "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",
@ -62,8 +62,8 @@ return [
'D3_MAILCHECKER_DMARCRESULT_HL' => 'DMARC (Reject policy and reporting)', 'D3_MAILCHECKER_DMARCRESULT_HL' => 'DMARC (Reject policy and reporting)',
'D3_MAILCHECKER_DMARCRESULT_DESC' => 'The DMARC entry defines how to deal with mails for which the authentication checks have failed. Mail addresses for reports can also be specified there.', 'D3_MAILCHECKER_DMARCRESULT_DESC' => 'The DMARC entry defines how to deal with mails for which the authentication checks have failed. Mail addresses for reports can also be specified there.',
'D3_MAILCHECKER_DMARCRESULT_SET' => 'A DMARC entry is set, the behaviour is not set to ignore.', 'D3_MAILCHECKER_DMARCRESULT_SET' => 'A DMARC entry is set, the behaviour is not set to "ignore".',
'D3_MAILCHECKER_DMARCRESULT_MISSING' => 'No DMARC entry is set or configured with ignore. This should be changed urgently.', 'D3_MAILCHECKER_DMARCRESULT_MISSING' => 'No DMARC entry is set or configured with "ignore". This should be changed urgently.',
'D3_MAILCHECKER_DMARCRESULT_ERROR' => 'The DMARC record cannot be checked', 'D3_MAILCHECKER_DMARCRESULT_ERROR' => 'The DMARC record cannot be checked',
'D3_MAILCHECKER_DMARCRESULT_LINKS' => 'Related Links', 'D3_MAILCHECKER_DMARCRESULT_LINKS' => 'Related Links',
'D3_MAILCHECKER_DMARCRESULT_LINK_ANALYSIS' => 'DMARC analysis', 'D3_MAILCHECKER_DMARCRESULT_LINK_ANALYSIS' => 'DMARC analysis',
@ -78,4 +78,4 @@ return [
"D3_MAILCHECKER_INFO_1" => "This module can help you to identify difficulties when sending emails or undelivered emails. Please go through the following tabs. Any necessary rework will be displayed there.", "D3_MAILCHECKER_INFO_1" => "This module can help you to identify difficulties when sending emails or undelivered emails. Please go through the following tabs. Any necessary rework will be displayed there.",
"D3_MAILCHECKER_INFO_2" => "Please note that the checks should not be active during productive operation of the shop!", "D3_MAILCHECKER_INFO_2" => "Please note that the checks should not be active during productive operation of the shop!",
"D3_MAILCHECKER_INFO_3" => 'If you require more detailed information or technical support, please contact us at: <a href="mailto:support@shopmodule.com">support@shopmodule.com</a><br><br<br>Your <img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> D3 Data Development team.', "D3_MAILCHECKER_INFO_3" => 'If you require more detailed information or technical support, please contact us at: <a href="mailto:support@shopmodule.com">support@shopmodule.com</a><br><br<br>Your <img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> D3 Data Development team.',
]; ];

View File

@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.d3data.de/D3Public/MyModule/compare/3.0.1.0...rel_3.x) ## [Unreleased](https://git.d3data.de/D3Public/MyModule/compare/3.0.1.0...rel_3.x)
### Added
- improve extendability for OAuth support
### Changed
- use SMTP debug instead of iDebug = 6
- use a non RFC 2606 blocked test mail address
### Fixed
- clean output buffer in case of thrown exception
## [3.0.1.0](https://git.d3data.de/D3Public/MailConfigChecker/compare/3.0.0.0...3.0.1.0) - 2024-07-10 ## [3.0.1.0](https://git.d3data.de/D3Public/MailConfigChecker/compare/3.0.0.0...3.0.1.0) - 2024-07-10
### Added ### Added

View File

@ -39,7 +39,6 @@
"beberlei/assert": "^3.3" "beberlei/assert": "^3.3"
}, },
"require-dev": { "require-dev": {
"php": "^8",
"friendsofphp/php-cs-fixer": "^3.9", "friendsofphp/php-cs-fixer": "^3.9",
"phpstan/phpstan": "^1.8", "phpstan/phpstan": "^1.8",
"boxblinkracer/phpunuhi": "^1.12" "boxblinkracer/phpunuhi": "^1.12"
@ -50,6 +49,7 @@
} }
}, },
"scripts": { "scripts": {
"php-cs-fixer": "./vendor/bin/php-cs-fixer fix --config=vendor/d3/mailconfigchecker/.php-cs-fixer.php",
"phpstan": "./vendor/bin/phpstan --configuration=./vendor/d3/mailconfigchecker/phpstan.neon", "phpstan": "./vendor/bin/phpstan --configuration=./vendor/d3/mailconfigchecker/phpstan.neon",
"phpunuhi": "./vendor/bin/phpunuhi --configuration=vendor/d3/mailconfigchecker/phpunuhi.xml validate" "phpunuhi": "./vendor/bin/phpunuhi --configuration=vendor/d3/mailconfigchecker/phpunuhi.xml validate"
} }

View File

@ -28,12 +28,14 @@
<div class="col-12 col-md-6 col-lg-4 mb-4"> <div class="col-12 col-md-6 col-lg-4 mb-4">
<div> <div>
<label class="col-4 form-label" for="oxshops__oxsmtp">[{oxmultilang ident="SHOP_MAIN_SMTPSERVER"}]</label> <label class="col-4 form-label" for="oxshops__oxsmtp">[{oxmultilang ident="SHOP_MAIN_SMTPSERVER"}]</label>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtp->fldmax_length}]" id="oxshops__oxsmtp" value="[{$shop->getFieldData('oxsmtp')}]" [{$readonly}]> <input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtp->fldmax_length}]" id="oxshops__oxsmtp" value="[{$smtpHost}]" [{$readonly}]>
</div>
<div>
<label class="col-4 form-label" for="oxshops__oxsmtpuser">[{oxmultilang ident="SHOP_MAIN_SMTPUSER"}]</label>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtpuser->fldmax_length}]" id="oxshops__oxsmtpuser" value="[{$shop->getFieldData('oxsmtpuser')}]" [{$readonly}]>
</div> </div>
[{block name="smtp_credentials"}]
<div>
<label class="col-4 form-label" for="oxshops__oxsmtpuser">[{oxmultilang ident="SHOP_MAIN_SMTPUSER"}]</label>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtpuser->fldmax_length}]" id="oxshops__oxsmtpuser" value="[{$smtpUser}]" [{$readonly}]>
</div>
[{/block}]
<div> <div>
<label class="col-4 form-label" for="oxshops__oxinfoemail">[{oxmultilang ident="SHOP_MAIN_INFOEMAIL"}]</label> <label class="col-4 form-label" for="oxshops__oxinfoemail">[{oxmultilang ident="SHOP_MAIN_INFOEMAIL"}]</label>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxinfoemail->fldmax_length}]" id="oxshops__oxinfoemail" value="[{$shop->getFieldData('oxinfoemail')}]" [{$readonly}]> <input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxinfoemail->fldmax_length}]" id="oxshops__oxinfoemail" value="[{$shop->getFieldData('oxinfoemail')}]" [{$readonly}]>

View File

@ -43,14 +43,16 @@
<label class="col-4 form-label" for="oxshops__oxsmtp">[{oxmultilang ident="SHOP_MAIN_SMTPSERVER"}]</label> <label class="col-4 form-label" for="oxshops__oxsmtp">[{oxmultilang ident="SHOP_MAIN_SMTPSERVER"}]</label>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtp->fldmax_length}]" id="oxshops__oxsmtp" name="smtpHost" value="[{if $smtpHost}][{$smtpHost}][{else}][{$shop->getFieldData('oxsmtp')}][{/if}]"> <input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtp->fldmax_length}]" id="oxshops__oxsmtp" name="smtpHost" value="[{if $smtpHost}][{$smtpHost}][{else}][{$shop->getFieldData('oxsmtp')}][{/if}]">
</div> </div>
<div> [{block name="smtp_credentials"}]
<label class="col-4 form-label" for="oxshops__oxsmtpuser">[{oxmultilang ident="SHOP_MAIN_SMTPUSER"}]</label> <div>
<input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtpuser->fldmax_length}]" id="oxshops__oxsmtpuser" name="smtpUser" value="[{if $smtpUser}][{$smtpUser}][{else}][{$shop->getFieldData('oxsmtpuser')}][{/if}]"> <label class="col-4 form-label" for="oxshops__oxsmtpuser">[{oxmultilang ident="SHOP_MAIN_SMTPUSER"}]</label>
</div> <input type="text" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtpuser->fldmax_length}]" id="oxshops__oxsmtpuser" name="smtpUser" value="[{if $smtpUser}][{$smtpUser}][{else}][{$shop->getFieldData('oxsmtpuser')}][{/if}]">
<div> </div>
<label class="col-4 form-label" for="oxshops__oxsmtppwd">[{oxmultilang ident="SHOP_MAIN_SMTPPASSWORD"}]</label> <div>
<input type="password" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtppwd->fldmax_length}]" id="oxshops__oxsmtppwd" name="smtpPwd" value="[{if $smtpPwd}][{$smtpPwd}][{else}][{$shop->getFieldData('oxsmtppwd')}][{/if}]"> <label class="col-4 form-label" for="oxshops__oxsmtppwd">[{oxmultilang ident="SHOP_MAIN_SMTPPASSWORD"}]</label>
</div> <input type="password" class="col-7 editinput" size="35" maxlength="[{$shop->oxshops__oxsmtppwd->fldmax_length}]" id="oxshops__oxsmtppwd" name="smtpPwd" value="[{if $smtpPwd}][{$smtpPwd}][{else}][{$shop->getFieldData('oxsmtppwd')}][{/if}]">
</div>
[{/block}]
<div> <div>
<label class="col-4 form-label" for="sender">[{oxmultilang ident="D3_MAILCHECKER_SMTPCHECK_SENDER"}]</label> <label class="col-4 form-label" for="sender">[{oxmultilang ident="D3_MAILCHECKER_SMTPCHECK_SENDER"}]</label>
<select name="from" class="col-7 editinput" id="sender"> <select name="from" class="col-7 editinput" id="sender">

View File

@ -28,12 +28,14 @@
<div class="col-12 col-md-6 col-lg-4 mb-4"> <div class="col-12 col-md-6 col-lg-4 mb-4">
<div> <div>
<label class="col-4 form-label" for="oxshops__oxsmtp">{{ translate({ ident: "SHOP_MAIN_SMTPSERVER" }) }}</label> <label class="col-4 form-label" for="oxshops__oxsmtp">{{ translate({ ident: "SHOP_MAIN_SMTPSERVER" }) }}</label>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtp.fldmax_length }}" id="oxshops__oxsmtp" value="{{ shop.getFieldData('oxsmtp') }}" {{ readonly }}> <input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtp.fldmax_length }}" id="oxshops__oxsmtp" value="{{ smtpHost }}" {{ readonly }}>
</div>
<div>
<label class="col-4 form-label" for="oxshops__oxsmtpuser">{{ translate({ ident: "SHOP_MAIN_SMTPUSER" }) }}</label>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtpuser.fldmax_length }}" id="oxshops__oxsmtpuser" value="{{ shop.getFieldData('oxsmtpuser') }}" {{ readonly }}>
</div> </div>
{% block smtp_credentials %}
<div>
<label class="col-4 form-label" for="oxshops__oxsmtpuser">{{ translate({ ident: "SHOP_MAIN_SMTPUSER" }) }}</label>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtpuser.fldmax_length }}" id="oxshops__oxsmtpuser" value="{{ smtpUser }}" {{ readonly }}>
</div>
{% endblock %}
<div> <div>
<label class="col-4 form-label" for="oxshops__oxinfoemail">{{ translate({ ident: "SHOP_MAIN_INFOEMAIL" }) }}</label> <label class="col-4 form-label" for="oxshops__oxinfoemail">{{ translate({ ident: "SHOP_MAIN_INFOEMAIL" }) }}</label>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxinfoemail.fldmax_length }}" id="oxshops__oxinfoemail" value="{{ shop.getFieldData('oxinfoemail') }}" {{ readonly }}> <input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxinfoemail.fldmax_length }}" id="oxshops__oxinfoemail" value="{{ shop.getFieldData('oxinfoemail') }}" {{ readonly }}>

View File

@ -43,14 +43,16 @@
<label class="col-4 form-label" for="oxshops__oxsmtp">{{ translate({ ident: "SHOP_MAIN_SMTPSERVER" }) }}</label> <label class="col-4 form-label" for="oxshops__oxsmtp">{{ translate({ ident: "SHOP_MAIN_SMTPSERVER" }) }}</label>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtp.fldmax_length }}" id="oxshops__oxsmtp" name="smtpHost" value="{% if smtpHost %}{{ smtpHost }}{% else %}{{ shop.getFieldData('oxsmtp') }}{% endif %}"> <input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtp.fldmax_length }}" id="oxshops__oxsmtp" name="smtpHost" value="{% if smtpHost %}{{ smtpHost }}{% else %}{{ shop.getFieldData('oxsmtp') }}{% endif %}">
</div> </div>
<div> {% block smtp_credentials %}
<label class="col-4 form-label" for="oxshops__oxsmtpuser">{{ translate({ ident: "SHOP_MAIN_SMTPUSER" }) }}</label> <div>
<input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtpuser.fldmax_length }}" id="oxshops__oxsmtpuser" name="smtpUser" value="{% if smtpUser %}{{ smtpUser }}{% else %}{{ shop.getFieldData('oxsmtpuser') }}{% endif %}"> <label class="col-4 form-label" for="oxshops__oxsmtpuser">{{ translate({ ident: "SHOP_MAIN_SMTPUSER" }) }}</label>
</div> <input type="text" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtpuser.fldmax_length }}" id="oxshops__oxsmtpuser" name="smtpUser" value="{% if smtpUser %}{{ smtpUser }}{% else %}{{ shop.getFieldData('oxsmtpuser') }}{% endif %}">
<div> </div>
<label class="col-4 form-label" for="oxshops__oxsmtppwd">{{ translate({ ident: "SHOP_MAIN_SMTPPASSWORD" }) }}</label> <div>
<input type="password" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtppwd.fldmax_length }}" id="oxshops__oxsmtppwd" name="smtpPwd" value="{% if smtpPwd %}{{ smtpPwd }}{% else %}{{ shop.getFieldData('oxsmtppwd') }}{% endif %}"> <label class="col-4 form-label" for="oxshops__oxsmtppwd">{{ translate({ ident: "SHOP_MAIN_SMTPPASSWORD" }) }}</label>
</div> <input type="password" class="col-7 editinput" size="35" maxlength="{{ shop.oxshops__oxsmtppwd.fldmax_length }}" id="oxshops__oxsmtppwd" name="smtpPwd" value="{% if smtpPwd %}{{ smtpPwd }}{% else %}{{ shop.getFieldData('oxsmtppwd') }}{% endif %}">
</div>
{% endblock %}
<div> <div>
<label class="col-4 form-label" for="sender">{{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_SENDER" }) }}</label> <label class="col-4 form-label" for="sender">{{ translate({ ident: "D3_MAILCHECKER_SMTPCHECK_SENDER" }) }}</label>
<select name="from" class="col-7 editinput" id="sender"> <select name="from" class="col-7 editinput" id="sender">