535-5.7.8 Username and Password not accepted when sending mail
try this:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=taibarani780@gmail.com
MAIL_PASSWORD=""
MAIL_ENCRYPTION=tls
Make sure that your password is rounded by the double quotes "".
Nodemailer: response: '535-5.7.8 Username and Password not accepted
Solved it by creating App password inside Google account. You must have 2-step verification actived.
Laravel 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
Just change your 'driver' => 'smtp', to 'driver' => 'sendmail' in env file.
Make sure allow less secure apps is ON in your google account settings.
Laravel not working sending emails with gmail
The error message you posted indicates that:
- Your attempt to send an email is being received successfully and correctly by Google.
- Google believes that the credentials you supplied are unacceptable, for whatever reason.
Following the URL in the error message, Google has some tips:
If you’re sure your password is right, try these tips:
- If you've turned on 2-Step Verification for your account, you might need to enter an App password instead of your regular password.
- Visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If asked, enter the letters in the distorted picture.
- Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account.
- Change your password according to our tips on creating a strong password.
In particular, 2-Step interference or the captcha might be good places to start figuring out why Google is unhappy. Nobody likes an unhappy Google.
Related Topics
Laravel Eloquent: How to Get Only Certain Columns from Joined Tables
Create Programmatically a Product Using Crud Methods in Woocommerce 3
How to Use Imagick to Merge and Mask Images
Adding 1 Day to a Datetime Format Value
Sending Post Parameters with Postman Doesn't Work, But Sending Get Parameters Does
PHP Code Formatter/Beautifier and PHP Beautification in General
Upload Multiple Images with Codeigniter
Should I Be Using Assert in My PHP Code
How to Convert MySQL Time to Unix Timestamp Using PHP
PHP Float with 2 Decimal Places: .00
Write CSV to File Without Enclosures in PHP
Get Root Directory Path of a PHP Project
Passing Data via Modal Bootstrap and Getting PHP Variable
Default as First Option in Switch Statement
Detect If Cookies Are Enabled in PHP