Skip to content

Commit

Permalink
Merge pull request #152 from dogawaf/fix-mail
Browse files Browse the repository at this point in the history
[BUGFIX] Fix sending of the notification email
  • Loading branch information
MattiasNilsson authored Feb 9, 2023
2 parents e24fa84 + e50a571 commit 81e606d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Classes/Service/Notification/NotificationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use TYPO3\CMS\Core\Mail\MailMessage;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MailUtility;

/**
* Class ErrorImportingNotificationService
Expand Down Expand Up @@ -43,8 +44,8 @@ public function notify(string $subject, string $message): void
$mailer = $this->getMailer();

$mailer
->setSubject($subject)
->setBody($message, 'text/html')
->subject($subject)
->html($message)
->send();
}

Expand All @@ -68,8 +69,8 @@ protected function getMailer(): MailMessage
$mail = GeneralUtility::makeInstance(MailMessage::class);

$mail
->setFrom($this->senderEmail)
->setTo($this->receiverEmail);
->from(MailUtility::getSystemFromAddress())
->to($this->receiverEmail);

return $mail;
}
Expand Down

0 comments on commit 81e606d

Please sign in to comment.