Expected response code 250 but got code 535 , with message 535-5.7.8 Username and Password not accepted
I researched on the internet and some answers includes enabling the "access for lesser app" and "unlocking gmail captcha" which sadly didn't work for me until I found the 2-step verification.
What I did the following was:
enable the 2-step verification to google HERE
Create App Password to be use by your system HERE
I selected Others (custom name) and clicked generate
Went to my env file in laravel and edited this
MAIL_USERNAME=talentscoutphil@gmail.com
MAIL_PASSWORD=thepasswordgenerated
- Restarted my apache server and boom! It works again.
This was my solution. I created this to atleast make other people not go wasting their time researching for a possible answer.
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.
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.
Related Topics
Php: Possible to Automatically Get All Posted Data
PHP Form - on Submit Stay on Same Page
Setting the Timezone for PHP in the PHP.Ini File
Why Should I Fix E_Notice Errors
How to Use .Htaccess to Hide .PHP Url Extensions
How to Change/Custom Password Field Name for Laravel 4 and Laravel 5 User Authentication
Include, Include_Once, Require or Require_Once
How to Read a List of Files from a Folder Using PHP
Setcookie, Cannot Modify Header Information - Headers Already Sent
Dynamic Paypal Button Encryption
Sending Images from Canvas Elements Using Ajax and PHP $_Files
How Do Detect That Transaction Has Already Been Started
Create Programmatically a Variable Product and Two New Attributes in Woocommerce