title: send mail yii2 zoho
body: <p>Im using swiftmailer in yii2 and zoho to send mail. Here is my config:</p>
  
  <pre><code>'mailer' =&gt; [
              'class' =&gt; 'yii\swiftmailer\Mailer',
              'viewPath' =&gt; '@common/mail',
              // send all mails to a uploads by default. You have to set
              // 'useFileTransport' to false and configure a transport
              // for the mailer to send real emails.
              'useFileTransport' =&gt; false,
              'transport' =&gt; [
                  'class' =&gt; 'Swift_SmtpTransport',
                  'host' =&gt; 'smtp.zoho.com',
                  'username' =&gt; 'username',
                  'password' =&gt; 'password',
                  'port' =&gt; '587',
                  'encryption' =&gt; 'TLS',
              ],
          ],
  </code></pre>
  
  <p>and here is my function:</p>
  
  <pre><code>public function SendMail($from, $to,$subject, $body)
      {
          Yii::$app-&gt;mailer-&gt;compose()
              -&gt;setFrom($from)
              -&gt;setTo($to)
              -&gt;setSubject($subject)
              -&gt;setTextBody($body)
              -&gt;send();
      }
  </code></pre>
  
  <p>It didn't work on server(integrate ssl) but it work find on my local, I've tried to debug but it return null and no exception. Can anyone have any idea to slove this stuff. Thanks in advance.</p>