| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace common\helpers;
- use Yii;
- class Email
- {
- /**
- * @param string $email
- * @param string $userName
- * @param string $password
- */
- public static function sendRegistrationEmail(string $email, string $userName, string $password)
- {
- $subject = 'Elken Welcome You.';
- // $str = "<p>恭喜! 恭喜您成功注册到Elken Global系统和家庭。 我们致力于打造你来打造他人 使用下面提供的链接登录您的后台办公室 用户名=".$userName." 密码=".$password." 我们建议您将密码更改为您容易记住的密码。 如需进一步查询,请随时联系+23480 3413 0554 我们致力于确保您成功。 再次恭喜!</p>";
- $str = "
- <p>CONGRATULATIONS!</p>
- <p>Congratulations on your successful registration into Elken Global system and family. We are committed to building you to build others Login to your back office using the link provided below <a href='https://ngds.elken.com/#/login'>Member Management System</a> Username = ".$userName." Password = ".$password."</p>
- <p>We recommend that you change your password to what you will easily remember. For further inquiries do not hesitate to contact +23480 3413 0554 We are committed to ensuring that you succeed. </p>
- <p>Once again congratulations!</p>
- ";
- $message = \Yii::t('app', $str);
- $mailer = Yii::$app->mailer;
- $mailer->useFileTransport = false;
- $mailer->compose()
- ->setFrom('eshop-noreply@elken.com')
- ->setTo($email)
- ->setSubject($subject)
- ->setHtmlBody($message)
- ->send();
- }
- }
|