From 46c64b01808d21020cd25d87abb0082f5c476747 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 7 Oct 2016 01:01:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA?= =?UTF-8?q?=D0=B0=20smtp=20=D0=B4=D0=BB=D1=8F=20production=20=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=B9=D0=BD?= =?UTF-8?q?=D0=B5=D1=80=20=D0=BD=D0=B0=20=D0=B3=D0=BB=D0=B0=D0=B2=D0=BD?= =?UTF-8?q?=D0=BE=D0=BC=20=D1=81=D0=B0=D0=B9=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env-dist | 4 ++++ common/config/config-prod.php | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.env-dist b/.env-dist index 04e853f..5b836a7 100644 --- a/.env-dist +++ b/.env-dist @@ -9,6 +9,10 @@ AUTHSERVER_HOST=authserver.ely.by # LETSENCRYPT_HOST=account.ely.by # LETSENCRYPT_EMAIL=erickskrauch@ely.by +# SMTP (только для production) +SMTP_USER= +SMTP_PASS= + # MySQL MYSQL_ALLOW_EMPTY_PASSWORD=yes MYSQL_ROOT_PASSWORD= diff --git a/common/config/config-prod.php b/common/config/config-prod.php index 0160435..373f6ca 100644 --- a/common/config/config-prod.php +++ b/common/config/config-prod.php @@ -6,5 +6,22 @@ return [ 'schemaCacheDuration' => 3600, 'schemaCache' => 'cache', ], + 'mailer' => [ + 'useFileTransport' => false, + 'transport' => [ + 'class' => Swift_SmtpTransport::class, + 'host' => 'ely.by', + 'username' => getenv('SMTP_USER'), + 'password' => getenv('SMTP_PASS'), + 'port' => 587, + 'encryption' => 'tls', + 'streamOptions' => [ + 'ssl' => [ + 'allow_self_signed' => true, + 'verify_peer' => false, + ], + ], + ], + ], ], ];