fix plaintext-mail content, thx to AlexL

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2025-01-31 00:03:54 +01:00
parent a2925af73a
commit 2f2d72851b
4 changed files with 4 additions and 4 deletions

View File

@@ -839,7 +839,7 @@ class Customers extends ApiCommand implements ResourceEntity
try {
$this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body;
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->Body = str_replace("\n", "<br />", $mail_body);
$this->mailer()->addAddress($email, User::getCorrectUserSalutation([
'firstname' => $firstname,
'name' => $name,

View File

@@ -265,7 +265,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
$this->mailer()->addReplyTo($admin['email'], User::getCorrectUserSalutation($admin));
$this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body;
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->Body = str_replace("\n", "<br />", $mail_body);
$this->mailer()->addAddress($email_full);
$this->mailer()->send();
} catch (\PHPMailer\PHPMailer\Exception $e) {

View File

@@ -288,7 +288,7 @@ class Ftps extends ApiCommand implements ResourceEntity
try {
$this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body;
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->Body = str_replace("\n", "<br />", $mail_body);
$this->mailer()->addAddress($customer['email'], User::getCorrectUserSalutation($customer));
$this->mailer()->send();
} catch (\PHPMailer\PHPMailer\Exception $e) {

View File

@@ -184,7 +184,7 @@ class Mysqls extends ApiCommand implements ResourceEntity
try {
$this->mailer()->Subject = $mail_subject;
$this->mailer()->AltBody = $mail_body;
$this->mailer()->msgHTML(str_replace("\n", "<br />", $mail_body));
$this->mailer()->Body = str_replace("\n", "<br />", $mail_body);
$this->mailer()->addAddress($userinfo['email'], User::getCorrectUserSalutation($userinfo));
$this->mailer()->send();
} catch (\PHPMailer\PHPMailer\Exception $e) {