티스토리 뷰
/**
* Version :: Laravel 5.5
* Desc :: Send mail from laravel
*/
config/mail.php
'from' => ['address' => ' {{{ Gmail Email ( From Gmail ) }}} ', 'name' => 'doriri'],
app/routes/web.php
Route::get('test', function()
{
Mail::send('views.emails.send', [], function ($message)
{
$message->to(' {{{ Target Email }}}', 'target')->subject('Welcome!');
});
});
.env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME= {{{ Gmail Email }}}
MAIL_PASSWORD= {{{ Gmail Password }}}
MAIL_ENCRYPTION=tls
If you got this error ::
Expected response code 250 but got code “535”, with message "535-5.7.8 Username and Password not accepted
-> Link ( 준비중 )
/**
* 궁금한 점은 댓글로 남겨주세요.
* Please fell free to ask me any questions.
*/
댓글