فهرست منبع

bugfix: EK-1022: 新注册的会员没有收到Welcome Message Email.

kevinElken 10 ماه پیش
والد
کامیت
10bff20cf4
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      common/helpers/Email.php

+ 5 - 3
common/helpers/Email.php

@@ -13,16 +13,18 @@ class Email
      */
     public static function sendRegistrationEmail(string $email, string $userName, string $password)
     {
-        $subject = \Yii::t('app', 'decRegistrationEmailSubject', [], 'en');
-        $message = \Yii::t('app', 'decRegistrationEmailContent', ['userName' => $userName, 'passWord' => $password], 'en');
+        $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::info('sendRegistrationEmail' . sprintf('sendRegistrationEmail: %s', json_encode([$email, $userName, $password, $response])));
     }
 }