[WordPress] WP Mail SMTP バージョン 1.7.0 でメール送信できない問題を解決した

WordPress プラグイン WP Mail SMTP をバージョン 1.7.0 へアップデートしたところ、メールが送信できなくなり無事に解決したのでご紹介します。

WordPress | ワードプレス

前提条件

WordPress, WP Mail SMTP, Contact Form 7 のバージョン

Contact Form 7 + WP Mail SMTP でエラー

Contact Form 7 + WP Mail SMTP で用意したお問い合わせフォーム から投稿すると、

メッセージの送信に失敗しました。間をおいてもう一度お試しいただくか、別の手段で管理者にお問い合わせ下さい。

というエラーメッセージが表示されてしまいました。

WP Mail SMTP の設定確認・修正

/wp-admin/admin.php?page=wp-mail-smtp&tab=test ページから [テストメールの送信] ができるので、WP Mail SMTP 経由でメール送信できるか確認します。

There was a problem while sending the test email.

[テストメールの送信] でメール送信できなかったエラーメッセージは以下の通りです。

There was a problem while sending the test email.

An issue was detected.

This means your test email was unable to be sent.

Typically this error is returned for one of the following reasons:

– Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc).
– Your web server is blocking the connection.
– Your host is rejecting the connection.

Recommended next steps:
Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste).
Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection – many shared hosts block certain ports.
Note: this is the most common cause of this issue.
Try using a different mailer.
Need support?
WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community.

To access our world class support, please upgrade to WP Mail SMTP Pro. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com.

Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don’t have time or maybe you feel a bit in over your head – we got you covered.

As a valued WP Mail SMTP user, you will get 20% off regular pricing, automatically applied at checkout!

Alternatively, we also offer limited support on the WordPress.org support forums. You can create a support thread there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider upgrading to WP Mail SMTP Pro to access our priority support ticket system.

Click here to view the full Error Log for debugging

原因) [送信元アドレス] と [送信者名] が逆の設定

「WP Mail SMTP のバージョンをアップデートしたときに設定が消えてしまった?」と考えて、/wp-admin/admin.php?page=wp-mail-smtp&tab=settings から設定を確認したところ、以下の画像のように Mail の項目の 送信元アドレス送信者名 が逆の設定になっていました。

WP Mail SMTP v1.7.0 bugs

フォームの入力値を入れ替えて、以下のような正しい設定にして [Save Settings] ボタンをクリックします。

  • 送信元アドレス: [email protected]
  • 送信者名: あなたが表示させたい送信者名

最後に、[テストメールの送信] で正常にメール送信できることが確認して、Contact Form 7 + WP Mail SMTP で用意したお問い合わせフォーム から正常に投稿できることも確認して、設定完了です。

以上、WP Mail SMTP をバージョン 1.7.0 で設定値が逆になり、メールが送信できなくなって困った、現場からお送りしました。