{"id":277087,"date":"2016-03-28T12:39:02","date_gmt":"2016-03-28T08:39:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277087"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277087","title":{"rendered":"\u041f\u0440\u043e\u0441\u0442\u043e\u0435 Yii2 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b"},"content":{"rendered":"<p>       \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432, \u043a\u0430\u043a \u043b\u043e\u0432\u043a\u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u0432 \u043e\u0444\u0438\u0441\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u0430 \u043e\u0442 \u043a\u043e\u0433\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e, \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c \u043f\u0438\u0441\u0435\u043c. \u0418\u0437 \u043f\u043e\u0434\u0440\u0443\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c Yii 2 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u043c swiftmailer, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f Ubuntu \u043d\u0430 VirtualBox (\u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c php \u0438 web-\u0441\u0435\u0440\u0432\u0435\u0440 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c basic \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Yii 2 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435: <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/851\/93f\/074\/85193f07489749a0b49ee013204d17b4.png\"\/><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f <i>\/config\/web.php<\/i>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>&#8216;useFileTransport&#8217;<\/i> \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 <i>true<\/i>, \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u043e\u0442\u043b\u043e\u0432\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 <i>\/runtime\/mail<\/i>. \u0422\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<p>  \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0447\u0442\u044b gmail.com:<\/p>\n<pre><code class=\"php\">\/\/config\/web.php 'mail' =&gt; [         'class' =&gt; 'yii\\swiftmailer\\Mailer',         'useFileTransport' =&gt; false,         'transport' =&gt; [             'class' =&gt; 'Swift_SmtpTransport',             'host' =&gt; 'smtp.gmail.com',             'username' =&gt; 'username@gmail.com',             'password' =&gt; 'password',             'port' =&gt; '587',             'encryption' =&gt; 'tls',             ],     ], <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u0430\u043a \u0438 \u0435\u0433\u043e IP \u0430\u0434\u0440\u0435\u0441. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 Microsoft. \u0415\u0435 \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u0443 Exchange \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043f\u043e\u043b\u044f\u0445 <i>&#8216;username&#8217;<\/i> \u0438 <i>&#8216;password&#8217;<\/i>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 \u00ab\u0421\u043f\u0430\u043c\u00bb \u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f. <\/p>\n<pre><code class=\"php\">'mailer' =&gt; [             'class' =&gt; 'yii\\swiftmailer\\Mailer',             'useFileTransport' =&gt; false,             'transport' =&gt; [             'class' =&gt; 'Swift_SmtpTransport',             'host' =&gt; 'exchange.example.com', \/\/\u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043c\u044f \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430             'username' =&gt; '',              'password' =&gt; '',             'port' =&gt; '25',             'encryption' =&gt; '',             ], ], <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u044c\u043c\u043e \u043d\u0435 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0430\u043d\u0442\u0438\u0441\u043f\u0430\u043c\u043e\u043c, \u043d\u0443\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Exchange.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c <i>MailerForm.php<\/i> \u0432 \u043f\u0430\u043f\u043a\u0435 <i>\/models<\/i>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">MailerForm.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">\/\/models\/MailerForm.php  &lt;?php  namespace app\\models;  use Yii; use yii\\base\\Model;  class MailerForm extends Model {     public $fromEmail;     public $fromName;     public $toEmail;     public $subject;     public $body;      public function rules()     {         return [             [['fromEmail', 'fromName', 'toEmail', 'subject', 'body'], 'required'],             ['fromEmail', 'email'],             ['toEmail', 'email']         ];     }      public function sendEmail()     {         if ($this-&gt;validate()) {             Yii::$app-&gt;mailer-&gt;compose()                 -&gt;setTo($this-&gt;toEmail)                 -&gt;setFrom([$this-&gt;fromEmail =&gt; $this-&gt;fromName])                 -&gt;setSubject($this-&gt;subject)                 -&gt;setTextBody($this-&gt;body)                 -&gt;send();              return true;         }         return false;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <i>mailer.php<\/i> \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u044b \u0432 \u043f\u0430\u043f\u043a\u0435 <i>\/views\/site\/<\/i>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">mailer.php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">\/\/views\/site\/mailer.php  &lt;?php  \/* @var $this yii\\web\\View *\/ \/* @var $form yii\\bootstrap\\ActiveForm *\/ \/* @var $model app\\models\\MailerForm *\/  use yii\\helpers\\Html; use yii\\bootstrap\\ActiveForm;  $this-&gt;title = 'Mailer'; $this-&gt;params['breadcrumbs'][] = $this-&gt;title; ?&gt; &lt;div class=&quot;site-contact&quot;&gt;     &lt;h1&gt;&lt;?= Html::encode($this-&gt;title) ?&gt;&lt;\/h1&gt;      &lt;?php if (Yii::$app-&gt;session-&gt;hasFlash('mailerFormSubmitted')) : ?&gt;          &lt;div class=&quot;alert alert-success&quot;&gt;             Your email has been sent         &lt;\/div&gt;      &lt;?php else : ?&gt;          &lt;p&gt;             This form for sending email from anywhere to anywhere         &lt;\/p&gt;          &lt;div class=&quot;row&quot;&gt;             &lt;div class=&quot;col-lg-5&quot;&gt;                  &lt;?php $form = ActiveForm::begin(['id' =&gt; 'mailer-form']); ?&gt;                      &lt;?= $form-&gt;field($model, 'fromName') ?&gt;                      &lt;?= $form-&gt;field($model, 'fromEmail') ?&gt;                      &lt;?= $form-&gt;field($model, 'toEmail') ?&gt;                      &lt;?= $form-&gt;field($model, 'subject') ?&gt;                      &lt;?= $form-&gt;field($model, 'body')-&gt;textArea(['rows' =&gt; 6]) ?&gt;                      &lt;div class=&quot;form-group&quot;&gt;                         &lt;?= Html::submitButton('Submit', ['class' =&gt; 'btn btn-primary', 'name' =&gt; 'contact-button']) ?&gt;                     &lt;\/div&gt;                  &lt;?php ActiveForm::end(); ?&gt;              &lt;\/div&gt;         &lt;\/div&gt;     &lt;?php endif; ?&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 <i>\/controllers\/SiteController.php<\/i>. \u0412 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0430\u0439\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <i>use app\\models\\MailerForm<\/i> \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u043c\u043e\u0434\u0435\u043b\u0438 MailerForm. \u0410 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>actionMailer()<\/i>.<\/p>\n<pre><code class=\"php\">&lt;?php  namespace app\\controllers;  use Yii; use yii\\filters\\AccessControl; use yii\\web\\Controller; use yii\\filters\\VerbFilter; use app\\models\\LoginForm; use app\\models\\ContactForm; use app\\models\\MailerForm; \/\/\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430  class SiteController extends Controller { \/\/\u2026\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434\u2026 public function actionMailer()     {         $model = new MailerForm();         if ($model-&gt;load(Yii::$app-&gt;request-&gt;post()) && $model-&gt;sendEmail()) {             Yii::$app-&gt;session-&gt;setFlash('mailerFormSubmitted');             return $this-&gt;refresh();         }           return $this-&gt;render('mailer', [               'model' =&gt; $model,           ]);     } \/\/\u2026\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434\u2026 } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u043f\u0440\u043e\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <i>index.php?r=site\/mailer<\/i> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u0444\u043e\u0440\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e\u0447\u0442\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/99f\/de8\/8c3\/99fde88c3ad14c8795b9401c73f84a2c.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0442\u0440\u0438\u0445\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u0444\u0430\u0439\u043b\u0435 \/views\/layouts\/main.php \u0432 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a:<\/p>\n<pre><code class=\"php\">echo Nav::widget([         'options' =&gt; ['class' =&gt; 'navbar-nav navbar-right'],         'items' =&gt; [             ['label' =&gt; 'Home', 'url' =&gt; ['\/site\/index']],             ['label' =&gt; 'About', 'url' =&gt; ['\/site\/about']],             ['label' =&gt; 'Contact', 'url' =&gt; ['\/site\/contact']], <\/code><\/pre>\n<p>  \u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443:<\/p>\n<pre><code class=\"php\">['label' =&gt; 'Mailer', 'url' =&gt; ['\/site\/mailer']], <\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u0433\u043e\u0442\u043e\u0432\u043e!<\/p>\n<p>  P.S.: \u041d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0437\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0439\u0442\u0435 \u043f\u043e\u0434\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043f\u0438\u0441\u044c\u043c\u0430\u043c\u0438 \u0441 \u043f\u043e\u0434\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044f\u043c\u0438. \u0418 \u043d\u0435 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0439\u0442\u0435 \u0441\u043f\u0430\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u044c \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 <a href=\"https:\/\/github.com\/danvop\/mailer\">https:\/\/github.com\/danvop\/mailer<\/a>. \u0422\u0430\u043c \u0436\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/280310\/\"> https:\/\/habrahabr.ru\/post\/280310\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432, \u043a\u0430\u043a \u043b\u043e\u0432\u043a\u043e \u043f\u0440\u0438\u043d\u0442\u0435\u0440 \u0432 \u043e\u0444\u0438\u0441\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0438\u0441\u044c\u043c\u0430 \u043e\u0442 \u043a\u043e\u0433\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e, \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c \u043f\u0438\u0441\u0435\u043c. \u0418\u0437 \u043f\u043e\u0434\u0440\u0443\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c Yii 2 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0432 \u043d\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u0435\u043c swiftmailer, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f Ubuntu \u043d\u0430 VirtualBox (\u043c\u043e\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c php \u0438 web-\u0441\u0435\u0440\u0432\u0435\u0440 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e).<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277087","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277087"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277087\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}