When I try to send an e-mail through my website running Laravel 4, I get this exception:
{"error":{"type":"Swift_TransportException","message":"Expected response code 250 but got code \"535\", with message \"535-5.7.8 Username and Password not accepted. Learn more at\r\n535 5.7.8 http:\/\/support.google.com\/mail\/bin\/answer.py?answer=14257 y70sm14744455qgd.3 - gsmtp\r\n\"","file":"\/var\/www\/vendor\/swiftmailer\/swiftmailer\/lib\/classes\/Swift\/Transport\/AbstractSmtpTransport.php","line":386}}
Here is my mail config:
return array( 'driver' => 'smtp', 'host' => 'smtp.gmail.com', 'port' => 465, 'from' => array('address' => '[email protected]', 'name' => 'myname'), 'encryption' => 'ssl', 'username' => '[email protected]', 'password' => 'lol', 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false, );
I've tried the disable link i've found by googling this issue except it didn't make a difference.
Is there a way to tell Google "stop blocking this IP, it's me" ?
I tried the same thing and got the same error. So i personally checked my gmail account and i had a message from Gmail itself letting me know that they'd blocked an access attempt to my email account.
They showed an option to disable this security setting by visiting https://www.google.com/settings/security/lesssecureapps.
Things will actually be more straight forward if you visit that link already logged in into your Gmail account.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With