WordPressプラグイン『WP Mail SMTP』で“Could not authenticate your SMTP account.”が発生したときの解決方法

Wordpressプラグイン『WP Mail SMTP』で“Could not authenticate your SMTP account.”が発生したときの解決方法 自宅サーバー
Wordpressプラグイン『WP Mail SMTP』で“Could not authenticate your SMTP account.”が発生したときの解決方法
Wordpressプラグイン『WP Mail SMTP』で“Could not authenticate your SMTP account.”が発生したときの解決方法

WordPressに「Contact Form 7」をインストールしたところ、問い合わせ内容の通知がメールでできないことに気づきました。どうやら、メールアドレスにGMAILを指定している場合は、「WP Mail SMTP」というプラグインを使うと良いことが分かりました。

WP Mail SMTPの設定で躓いてしまったので、その対処法を残しておきます。

問題事象

WP Mail SMTP > 設定 > Generalで一通り設定を完了し、Email Testでメール送信テストをしたところ、下図の通り“ There was a problem while sending the test email. となり、メール送信に失敗してしまいました。

問題の内容は、SMTPサーバの認証のようです。

There was a problem while sending the test email.
Could not authenticate your SMTP account.

This means we were able to connect to your SMTP host, but were not able to proceed using the email/password in the settings.
Typically this error is returned when the email or password is not correct or is not what the SMTP host is expecting.

そして、対処としてはGMAILのアカウント/パスワードの再確認ということでした。

Recommended next steps:
1. Triple check your SMTP settings including host address, email, and password. If you have recently reset your password you will need to update the settings.
2. Contact your SMTP host to confirm you are using the correct username and password.
3. Verify with your SMTP host that your account has permissions to send emails using outside connections.

GMAILのアカウント/パスワードは間違いがないことを確認しましたが、上記のエラーで躓いてしまいました。

解決方法

解決方法は以下の通りです。

①GMAILアカウント設定のLess secure app accessのページを開く

https://myaccount.google.com/lesssecureapps

参考までに、英語設定だと以下のようなページです。

②安全性の低いアプリの許可を有効にする

「安全性の低いアプリの許可:」有効(ON)に変更します。

英語の言語設定だと“Allow less secure apps: ”という表示となります。これを有効(ON)に変更します。

対処は以上です。

確認

改めて、WP Mail SMTP > 設定 > Email Testでメール送信テストをしてみます。

上記の対応により、WP Mail SMTPを利用したメールの送信ができるようになりました。

結果として、「Contact Form 7」の投稿通知も無事受信することを確認できました。

コメント

タイトルとURLをコピーしました