|
|
@@ -8,8 +8,9 @@ class Email
|
|
|
{
|
|
|
/**
|
|
|
* @param string $email
|
|
|
+ * @return bool
|
|
|
*/
|
|
|
- public static function sendAdminLoginCode(string $email)
|
|
|
+ public static function sendAdminLoginCode(string $email): bool
|
|
|
{
|
|
|
$subject = 'Elken Login Code';
|
|
|
$code = Tool::randomString(6);
|
|
|
@@ -18,8 +19,8 @@ class Email
|
|
|
$mailer = Yii::$app->mailer;
|
|
|
$mailer->useFileTransport = false;
|
|
|
return $mailer->compose()
|
|
|
-// ->setFrom('eshop-noreply@elken.com')
|
|
|
- ->setFrom(Yii::$app->params['adminEmail'])
|
|
|
+ ->setFrom('eshop-noreply@elken.com')
|
|
|
+// ->setFrom(Yii::$app->params['adminEmail'])
|
|
|
->setTo($email)
|
|
|
->setSubject($subject)
|
|
|
->setHtmlBody($message)
|