0

i cant able to config mail server in laravel 6 my config file or fallowed

.evn

MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=my_email
MAIL_PASSWORD=my_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=my_email
MAIL_FROM_NAME="${APP_NAME}"

mail/config

return [

    'driver' => env('MAIL_DRIVER', 'smtp'),
    'port' => env('MAIL_PORT', 587),
    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', 'my_email'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],

    'encryption' => env('MAIL_ENCRYPTION', 'tls'),
    'username' => env('my_email'),
    'password' => env('my_password'),
    'sendmail' => '/usr/sbin/sendmail -bs',

    'markdown' => [
        'theme' => 'default',

        'paths' => [
            resource_path('views/vendor/mail'),
        ],
    ],


    'log_channel' => env('MAIL_LOG_CHANNEL'),

];

GOOGLE ACCOUNT

  • Less secure app access- on
  • Account access enabled - Please try signing in to your Google account again from your new device or application.

ERROR

i have a bulk error if i used password rest that are

Failed to authenticate on SMTP server with username "my_email" using 3 possible authenticators. Authenticator LOGIN returned Expected response code 235 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 j28sm3059672pgb.36 - gsmtp ". Authenticator PLAIN returned Expected response code 235 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 j28sm3059672pgb.36 - gsmtp ". Authenticator XOAUTH2 returned 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 j28sm3059672pgb.36 - gsmtp ".

kealaxshan
  • 338
  • 2
  • 14

1 Answers1

0

now it is working i changed mail_password with in double code

MAIL_PASSWORD=my_password

TO

MAIL_PASSWORD="my_password"
kealaxshan
  • 338
  • 2
  • 14