php - laravel send mail on server with gmail not working -
hi in laravel application im sending mail when create new user !! in localhost use gmail smtp gmail account , username , it's working on server got error
swift_transportexception expected response code 250 got code "535", message "535-5.7.8 username , password not accepted. learn more @ 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 pn5sm18998642wjc.4 - gsmtp "
here code
if ($user->save()) { view::composer('emails.auth.usermail', function($view) { $mail = input::get('email'); $pass = input::get('password'); $view->with('username' , $mail )->with('password' , $pass ); }); mail::send('emails.auth.usermail', $data, function($message) use ($user) { $message->to(input::get('email'), '') ->subject('nouveau compte happy road '); });
in mail.php
'driver' => 'smtp', 'host' => 'smtp.gmail.com', 'port' => 465, 'from' => array('address' => name@gmail.com', 'name' => 'name'), 'encryption' => 'ssl', 'username' => 'mymail@gmail.com', 'password' => 'mypassword', 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false,
solved genering new password application security.google.com/settings/security/apppasswords
Comments
Post a Comment