smtp
This commit is contained in:
@ -10,9 +10,11 @@ use kernel\Flash;
|
||||
use kernel\helpers\Debug;
|
||||
use kernel\helpers\Files;
|
||||
use kernel\helpers\RESTClient;
|
||||
use kernel\helpers\SMTP;
|
||||
use kernel\modules\module_shop_client\services\ModuleShopClientService;
|
||||
use kernel\Request;
|
||||
use kernel\services\ModuleService;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
class ModuleShopClientController extends AdminController
|
||||
{
|
||||
@ -118,4 +120,21 @@ class ModuleShopClientController extends AdminController
|
||||
$this->redirect('/admin/module_shop_client', 302);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function actionAuth(): void
|
||||
{
|
||||
$request = new Request();
|
||||
$address = $request->post("email");
|
||||
$mail = new SMTP([
|
||||
'host' => 'smtp.mail.ru',
|
||||
'port' => 587,
|
||||
'username' => 'chancellery@itguild.info',
|
||||
'password' => 'iBdGdxmJk1mnySJYtXc0'
|
||||
]);
|
||||
|
||||
$mail->send($address);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user