use modified info address from shop for connection test
prevent providers RFC 2606 notification
This commit is contained in:
parent
586aa9e9c8
commit
8204a1ebd2
@ -26,12 +26,22 @@ use OxidEsales\Eshop\Core\Registry;
|
||||
class MailConfigCheck extends AdminDetailsController
|
||||
{
|
||||
protected $_sThisTemplate = '@'.Constants::OXID_MODULE_ID.'/admin/mailConfigCheck';
|
||||
protected string $testMailAddress = 'test@example.tld';
|
||||
protected string $testMailAddress;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
try {
|
||||
$infoMail = Registry::getConfig()->getActiveShop()->getFieldData( 'oxinfoemail' );
|
||||
Assert::that($infoMail)->email();
|
||||
$re = '/.*(@.*$)/m';
|
||||
$subst = "noreply$1";
|
||||
$this->testMailAddress = preg_replace($re, $subst, $infoMail);
|
||||
} catch (InvalidArgumentException) {
|
||||
$this->testMailAddress = 'test@example.tld';
|
||||
}
|
||||
|
||||
$this->setSmtpCredentials();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user