diff --git a/api/mails/registration-confirmation-html.php b/api/mails/registration-confirmation-html.php index 75ca25f..0cc5dd7 100644 --- a/api/mails/registration-confirmation-html.php +++ b/api/mails/registration-confirmation-html.php @@ -4,5 +4,5 @@ */ ?> -

Текст письма

+

В общем, по результату работы сложного PHP скрипта, вы успешно зарегистрированы.

Код:

diff --git a/api/mails/registration-confirmation-text.php b/api/mails/registration-confirmation-text.php index 63e582c..f58daae 100644 --- a/api/mails/registration-confirmation-text.php +++ b/api/mails/registration-confirmation-text.php @@ -4,6 +4,6 @@ */ ?> -В общем по результату работы сложного PHP скрипта вы успешно зарегистрированы. +В общем, по результату работы сложного PHP скрипта, вы успешно зарегистрированы. Код активации diff --git a/api/models/RegistrationForm.php b/api/models/RegistrationForm.php index f476675..4b044eb 100644 --- a/api/models/RegistrationForm.php +++ b/api/models/RegistrationForm.php @@ -85,12 +85,17 @@ class RegistrationForm extends BaseApiForm { /** @var \yii\swiftmailer\Mailer $mailer */ $mailer = Yii::$app->mailer; /** @var \yii\swiftmailer\Message $message */ - $message = $mailer->compose([ - 'html' => '@app/mails/registration-confirmation-html', - 'text' => '@app/mails/registration-confirmation-text', - ], [ - 'key' => $emailActivation->key, - ])->setFrom(['account@ely.by' => 'Ely.by']); + $message = $mailer->compose( + [ + 'html' => '@app/mails/registration-confirmation-html', + 'text' => '@app/mails/registration-confirmation-text', + ], + [ + 'key' => $emailActivation->key, + ] + ) + ->setFrom([Yii::$app->params['fromEmail'] => 'Ely.by Accounts']) + ->setSubject('Ely.by Account registration'); if (!$message->send()) { throw new ErrorException('Unable send email with activation code.'); diff --git a/environments/dev/common/config/params-local.php b/environments/dev/common/config/params-local.php index d0b9c34..c573d3a 100644 --- a/environments/dev/common/config/params-local.php +++ b/environments/dev/common/config/params-local.php @@ -1,3 +1,4 @@ 'account@ely.by', ]; diff --git a/environments/prod/common/config/params-local.php b/environments/prod/common/config/params-local.php index d0b9c34..c573d3a 100644 --- a/environments/prod/common/config/params-local.php +++ b/environments/prod/common/config/params-local.php @@ -1,3 +1,4 @@ 'account@ely.by', ];