Chg #6212: Revise email sender (always use the system name) (#6227)

Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com>
This commit is contained in:
Marc Farré 2023-06-29 19:04:11 +02:00 committed by GitHub
parent 6fd4f21ffb
commit c4ef719485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -16,6 +16,7 @@ HumHub Changelog
- Fix #6189: Module settings survive deactivation in cache
- Enh #6236: Logging: Show log entries from migrations with category migration
- Fix #6216: Spaces icon in admin menu
- Chg #6212: Revise email sender (always use the system name)
- Fix #6229: Bug on saving forms: Zend OPcache API is restricted by "restrict_api"
- Enh #6225: Removed deprecated MarkdownEditor usages
- Enh #6240: Add ability to set showAtDashboard in SpaceMembership::addMember method

View File

@ -67,14 +67,8 @@ class MailTarget extends BaseTarget
'content_plaintext' => $renderer->renderText($notification)
], $notification->getViewParams());
if ($notification->originator) {
$from = $notification->originator->displayName . ' (' . Yii::$app->name . ')';
} else {
$from = Yii::$app->settings->get('mailer.systemEmailName');
}
$mail = Yii::$app->mailer->compose($this->view, $viewParams)
->setFrom([Yii::$app->settings->get('mailer.systemEmailAddress') => $from])
->setFrom([Yii::$app->settings->get('mailer.systemEmailAddress') => Yii::$app->settings->get('mailer.systemEmailName')])
->setTo($recipient->email)
->setSubject(str_replace("\n", " ", trim($notification->getMailSubject())));
if ($replyTo = Yii::$app->settings->get('mailer.systemEmailReplyTo')) {