Laravel5.5, vagrantを使用しローカルにて、お問い合わせフォームを作成しております。
その中でtinckerを利用し
Mail::raw('test mail',function($message) {$message->to('to@mail.com')->subject('test');});
と入力すると、
Failed to authenticate on SMTP server with username "youremail@gmail.com" using 3 possible authenticators"
のエラーが出力されます。
そこでhttps://learninglaravel.net/learn-to-send-emails-using-gmail-and-sendgrid-in-laravel-5を参考にすると
「You may try one of these methods」
①Go to https://accounts.google.com/UnlockCaptcha, click continue and unlock your account for access through other media/sites.
②Using a double quote password: "your password"
③Try to use only your Gmail username: yourGmailUsername
こちら①と②を試しましたが、結果は特に変わりませんでした。また③は具体的に何を変更するのか不明です。
.envファイル
MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=youremail@gmail.com MAIL_PASSWORD="password" MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=from@example.com MAIL_FROM_NAME=test
laravelにてgmailを使用しメールの送信をされたことがある方など、こちらの問題点について何かご存知であればご回答をお願いしたいです。
よろしくお願いいたします。

回答3件
あなたの回答
tips
プレビュー