H
H
hollanditkzn2017-04-07 19:05:02
Yii
hollanditkzn, 2017-04-07 19:05:02

How to send mail using gmail?

Expected response code 250 but got code "535", with message "535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 https://support.google.com/mail/?p=BadCredentials e88sm1040527lji. 26 - gsmtp
"
I get this error, is it gmail or not?
in file common/config/main-local.php

'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            'transport' => [
                'class' => 'Swift_SmtpTransport',
                'host' => 'smtp.gmail.com',
                'username' => '[email protected]',
                'password' => '123456',
                'port' => 465,
                'encryption' => 'ssl',
                ],

            'useFileTransport' => false,
        ],

Or am I doing something wrong?
Untrusted apps are allowed and still have this problem

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question