From e59efe83e7fe086fa8b35ffe83b762045d5a6e6b Mon Sep 17 00:00:00 2001
From: ThomasDartsch
Date: Thu, 11 Apr 2024 15:33:57 +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 048c885..ad02f2b 100644
--- a/Application/Controller/Admin/MailConfigCheck.php
+++ b/Application/Controller/Admin/MailConfigCheck.php
@@ -73,9 +73,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'));
$mail->send();
$this->addTplParam('mailer', $mail->getMailer());
} catch (Exception $e) {
|