Все части, отвечающие за отправку E-mail вынесены в отдельный компонент

This commit is contained in:
ErickSkrauch
2017-04-21 01:41:43 +03:00
parent 0e2aff91d0
commit c0780736ca
17 changed files with 427 additions and 126 deletions

View File

@@ -2,6 +2,7 @@
namespace api\models\authentication;
use api\components\ReCaptcha\Validator as ReCaptchaValidator;
use api\emails\EmailHelper;
use api\models\base\ApiForm;
use common\helpers\Error as E;
use common\components\UserFriendlyRandomKey;
@@ -72,8 +73,7 @@ class RepeatAccountActivationForm extends ApiForm {
throw new ErrorException('Unable save email-activation model.');
}
$regForm = new RegistrationForm();
$regForm->sendMail($activation, $account);
EmailHelper::registration($activation);
$transaction->commit();
} catch (ErrorException $e) {