From 4e9eda3b5b93f87b8995fe1fe8ec410ac764538e Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Fri, 20 Mar 2020 14:18:34 +0100 Subject: [PATCH] sendMail --- core/Api/SendMail.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/Api/SendMail.class.php b/core/Api/SendMail.class.php index d1d80fa..e093a89 100644 --- a/core/Api/SendMail.class.php +++ b/core/Api/SendMail.class.php @@ -23,18 +23,18 @@ class SendMail extends Request { return false; } - $mailData = getMailData(); + $mailConfig = $this->user->getConfiguration()->getMail(); $mail = new \External\PHPMailer\PHPMailer; $mail->IsSMTP(); $mail->setFrom($this->getParam('from'), $this->getParam('fromName')); $mail->addAddress($this->getParam('to')); $mail->Subject = $this->getParam('subject'); $mail->SMTPDebug = 0; - $mail->Host = $mailData->getHost(); - $mail->Port = $mailData->getPort(); + $mail->Host = $mailConfig->getHost(); + $mail->Port = $mailConfig->getPort(); $mail->SMTPAuth = true; - $mail->Username = $mailData->getLogin(); - $mail->Password = $mailData->getPassword(); + $mail->Username = $mailConfig->getLogin(); + $mail->Password = $mailConfig->getPassword(); $mail->SMTPSecure = 'tls'; $mail->IsHTML(true); $mail->CharSet = 'UTF-8';