0

最近、laravelアプリをパゴダボックスにデプロイしました。メール以外は正常に動作しています。私のアプリでは、ユーザーの登録があり、登録するとメールが届きます。この機能は localhost で正常に動作していますが、パゴダ ボックスの設定が不足しているようです。アプリのメールの資格情報は次のとおりです。

'driver' => 'smtp',
'host' => 'smtp.gmail.com',
'port' => 587,
'from' => array('address' => 'username@gmail.com', 'name' => 'Admin'),
'encryption' => 'tls',
'username' => 'username@gmail.com',
'password' => 'password',
'sendmail' => '/usr/sbin/sendmail -bs',
'pretend' => false,

パゴダボックスの資格情報は次のとおりです。

SMTP Host: Gmail
Email/Username: username@gmail.com
Password:password
Outgoing Email Server: smtp.gmail.com
Port Number: 587
TLS: Yes
Auth Type: plain   

また、Gmail アカウントで POP と IMAP の両方が有効になっています。私が得ているエラーは、

Swift_TransportException

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   http://support.google.com/mail/bin/answer.py?answer=14257 x14sm24451446obp.19 - gsmtp "

そして、メールアドレスとポートを変更してみましたが、使い物になりませんでした。何か足りないのですか?または、資格情報を変更する必要がありますか?

4

1 に答える 1

0

Hello this settings worked for me:

return array(
  'driver' => 'smtp',
  'host' => 'smtp.gmail.com',
  'port' => 587,
  'from' => array('address' => 'yourusername@gmail.com', 'name' => 'Test from laravel'),
  'encryption' => 'tls',
  'username' => 'yourusername@gmail.com',
  'password' => 'yourpassword',
  'sendmail' => '/usr/sbin/sendmail -bs',
  'pretend' => false,

);

If you're still having problems, visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If necessary, enter the letters in the distorted picture.

https://support.google.com/mail/answer/14257

于 2014-07-10T10:03:36.590 に答える