Removed HTML encode for FROM attribute of Email

Fix #3599
This commit is contained in:
githubjeka 2019-10-03 09:34:18 +03:00
parent a406f9f7de
commit 4ac6c84078

View File

@ -9,7 +9,6 @@
namespace humhub\modules\notification\targets;
use Yii;
use yii\helpers\Html;
use humhub\modules\notification\components\BaseNotification;
use humhub\modules\user\models\User;
@ -68,8 +67,11 @@ class MailTarget extends BaseTarget
'content_plaintext' => $renderer->renderText($notification)
], $notification->getViewParams());
$from = $notification->originator ? Html::encode($notification->originator->displayName) . ' (' . Html::encode(Yii::$app->name) . ')' : Yii::$app->settings->get('mailer.systemEmailName');
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])