webかたつむり ウェブデザインを勉強中 ウェブ初心者のおぼえがき



wordpress contactform7






Why Aren’t Emails Getting Delivered?

There are two main reasons that WordPress emails don’t deliver successfully: server configuration and spam filtering.

WordPress, and WordPress plugins, will by default send email using the PHPmail() function. This is a simple way of sending email, and many WordPress hosting servers are not configured to use this mail() function.

In addition, your email provider checks all incoming email to determine if it should be allowed to deliver, sent to spam, or blocked entirely. One way it will do this is by checking if the email is originating from the same location it claims to be sent from.

For example, if your email server is gmail.com but your email claims to be sent from your website’s domain, your form notification may be blocked before it even reaches the spam folder.


その多くの記事で解決方法として書かれているのが、「wp mail SMPT」というプラグインを導入することでした。

How to Fix Email Delivery Issues

SMTP (Simple Mail Transfer Protocol) will fix email delivery issues by changing the way your emails are sent and properly authenticating them. SMTP is the industry standard for ensuring email deliverability, and WP Mail SMTP is the most flexible way to connect to many different SMTP services.

Below is a list of all of the ways you can use WP Mail SMTP to set up SMTP on your site, along with links to tutorials on each:

  • Gmail or G Suite: Works only with Google emails, more secure, no subscription
  • Mailgun: Works with any email, more secure, requires subscription
  • SendGrid: Works with any email, more secure, requires subscription
  • Other SMTP: Works with any email, less secure, no subscription



SMTP Settings Overview

SMTP must be able to connect to your email provider, which is why it requires additional setup through a plugin like WP Mail SMTP.

Unlike our other options which use APIs to allow this setup information to be stored with Google, SendGrid, or Mailgun, the Other SMTP option in WP Mail SMTP requires this setup information to be stored directly on your site.

Below, we’ll go into more detail on each of the fields required to set up an “Other SMTP” option in WP Mail SMTP.
















This is the the address to the host’s SMTP server.









The most common ports are 587 and 465, however hosts can and do change these. It’s not uncommon for web hosts to block these ports, so before you begin it’s always good to verify with your web host that the required port is open. If closed, most of the time your hosting provider can open it for you.

SSL and TLS are the most widely used encryptions. If your email provider offers both, we recommend TLS. It is worth noting that usually TLS encryption is used with port 587, while SSL is used with port 465.



SMTP username」および「SMTP password」はメールアカウントのユーザー名とパスワードを記入すればよい。

Modern email providers require authentication. Disabling it may be needed for local development or other edge case scenarios, however most providers need this turned on.

SMTP Username
Your username is typically your email address for the email provider; e.g. john@gmail.com or john@hotmail.com. Some providers such as AOL require the non-email format; e.g. if your email is john_doe@aol.com your username would be john_doe.

SMTP Password
This is your email account password. Please note although the password is not viewable in the settings, it is still stored in the database as plain text. This is required since establishing the SMTP connection requires sending the password in plaintext.

With this in mind, we highly recommend you set up your password in your WordPress configuration file, wp-config.php for improved security. For extra instructions, check out WPBeginner’s tutorial on how to edit the config file.