|
|
@@ -2,14 +2,10 @@
|
|
|
|
|
|
namespace common\helpers;
|
|
|
|
|
|
-require 'vendor/autoload.php';
|
|
|
-use Mailgun\Mailgun;
|
|
|
use Yii;
|
|
|
|
|
|
class Email
|
|
|
{
|
|
|
- private static $mailKey = '4f64981556009f8e9fc2e112a65d3be3-67bd41c2-4e17cb05';
|
|
|
-
|
|
|
/**
|
|
|
* @param string $email
|
|
|
* @param string $userName
|
|
|
@@ -31,15 +27,4 @@ class Email
|
|
|
|
|
|
LoggerTool::debug('sendRegistrationEmail' . sprintf('sendRegistrationEmail: %s', json_encode([$email, $userName, $password, $response])));
|
|
|
}
|
|
|
-
|
|
|
- public static function sendEmail(string $email, string $userName, string $password)
|
|
|
- {
|
|
|
- $mg = Mailgun::create(self::$mailKey);
|
|
|
- $mg->messages()->send('ng-frontend-api.elken.com', [
|
|
|
- 'from' => 'Elken <no.reply.elken@gmail.com>',
|
|
|
- 'to' => $email,
|
|
|
- 'subject' => \Yii::t('app', 'decRegistrationEmailSubject', []),
|
|
|
- 'html' => \Yii::t('app', 'decRegistrationEmailContent', ['userName' => $userName, 'passWord' => $password]),
|
|
|
- ]);
|
|
|
- }
|
|
|
}
|