From 30dc8f445a78a645258631bf5969393b58e38f99 Mon Sep 17 00:00:00 2001
From: ThomasDartsch
Date: Thu, 11 Apr 2024 15:31:55 +0200
Subject: [PATCH] add ownermail as "setfrom". Without this the email method
ends always in status "phpmailer"and not "smtp"
---
Application/Controller/Admin/MailConfigCheck.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Application/Controller/Admin/MailConfigCheck.php b/Application/Controller/Admin/MailConfigCheck.php
index 5d793e1..9be2a59 100644
--- a/Application/Controller/Admin/MailConfigCheck.php
+++ b/Application/Controller/Admin/MailConfigCheck.php
@@ -78,9 +78,12 @@ class MailConfigCheck extends AdminDetailsController
protected function getCurrentMailer()
{
try {
+ $shop = Registry::getConfig()->getActiveShop();
+
$mail = oxNew(Email::class);
$mail->setRecipient($this->testMailAddress);
$mail->setBody('.');
+ $mail->setFrom($shop->getFieldData('oxowneremail'));
set_error_handler([$this, 'exceptions_error_handler']);
$mail->send();
$this->addTplParam('mailer', $mail->getMailer());
|