Send mail by Yii 2

Send mail by Yii 2

    Here is my config
    1. 'mailer' => [
    2.             'class' => 'yii\swiftmailer\Mailer',
    3.             'viewPath' => '@common/mail',
    4.             'transport' => [
    5. 'class' => 'Swift_SmtpTransport',
    6. 'host' => 'smtp.zoho.com', 
    7. 'username' => 'admin@p2code.com', 
    8. 'password' => '***',
    9. 'port' => '587',
    10. 'encryption' => 'tls',
    11. ],
    12.         ],

    and get error: Failed to authenticate on SMTP server with username " admin@p2code.com" using 2 possible authenticators