|
- <?php
-
- namespace common\services\User;
-
- use common\logic\BaseService;
- use common\logic\Producer\ProducerModel;
- use common\logic\UtilsInterface;
- use common\models\UserModel;
-
- class UserUtils extends BaseService implements UtilsInterface
- {
- public function sendEmailSignup(UserModel $user, ProducerModel $producer)
- {
- \Yii::$app->mailer->compose(
- [
- 'html' => 'signup-html',
- 'text' => 'signup-text'
- ],
- [
- 'user' => $user,
- 'producer' => $producer
- ])
- ->setTo($user->email)
- ->setFrom([\Yii::$app->params['adminEmail'] => 'distrib'])
- ->setSubject('[Opendistrib] Inscription')
- ->send();
- }
- }
|