|
|
@@ -13,16 +13,18 @@ class Email
|
|
|
*/
|
|
|
public static function sendRegistrationEmail(string $email, string $userName, string $password)
|
|
|
{
|
|
|
- $subject = \Yii::t('app', 'decRegistrationEmailSubject');
|
|
|
+ $subject = \Yii::t('app', 'decRegistrationEmailSubject', []);
|
|
|
$message = \Yii::t('app', 'decRegistrationEmailContent', ['userName' => $userName, 'passWord' => $password]);
|
|
|
|
|
|
$mailer = Yii::$app->mailer;
|
|
|
$mailer->useFileTransport = false;
|
|
|
- $mailer->compose()
|
|
|
+ $response = $mailer->compose()
|
|
|
->setFrom('eshop-noreply@elken.com')
|
|
|
->setTo($email)
|
|
|
->setSubject($subject)
|
|
|
->setHtmlBody($message)
|
|
|
->send();
|
|
|
+
|
|
|
+ LoggerTool::debug('sendRegistrationEmail' . sprintf('sendRegistrationEmail: %s', json_encode([$email, $userName, $password, $response])));
|
|
|
}
|
|
|
}
|