Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressのメール送信にSMTPサーバーを使う方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressサイトからのメールの受信や送信でお困りですか?

メールの到達性は、サイトを運営する上で最も重要な要素のひとつです。パスワード再設定メールから注文確認メールまで、信頼性の高いメールサービスは必須です。

この投稿では、SMTPサーバーを使用してWordPressメールを送信する方法を紹介します。

SMTP-server-to-send-WordPress-emails-OG

WordPressメールの問題点

WordPressは、メール送信を含むほとんどの機能にPHPを使用しています。

多くの共有ホスティングサービスプロバイダーは、メール機能を適切に設定していないか、悪用を避けるために完全に無効化しています。どちらの場合も、WordPressのメールが配信されない原因となります。

別の解決策としては、サードパーティのメールサービスを使ってメールを送信する方法があります。Mailgun、Google Workspace、SendGridなどのサービスが利用できます。

その費用は、追加するユーザー/アカウントの数や送信するメールの数によって異なります。WordPressでメールが送信されない問題の解決方法については、チュートリアルをご覧ください。

さらに、一部のホスティングサービスでは、ユーザーがサーバーから送信できるメールの数を制限しています。WordPressのメールが送信されない理由については、WordPressでニュースレターメールを送信してはいけない理由のブログ投稿をご覧ください。

しかし、別の設定もある。すでにお持ちのWordPressホスティングサービスを使って、SMTPを使ってメールを送信することができます。

SMTPとは、Simple Mail Transfer Protocolの略で、外部のメールサーバーを利用してメール配信を行うことができます。これにより、メールの到達率が向上し、スパムフォルダーに入るのを防ぐことができます。

動画チュートリアル

Subscribe to WPBeginner

書面による指示については、そのまま読み進めてほしい。

ホスティングサービスによるメールアカウントの利用

ほとんどのWordPressホスティングサービスプロバイダーは、ホストしているドメインごとにメールサービスを提供しています。つまり、yourname@yoursite.com のような独自のドメイン名でメールアカウントを作成することができます。

サイトのドメインを使用することで、メールリストから購読者を引き込むことができ、個人的な受信トレイではなくドメイン名でメッセージを送信することで、ブランド維持に役立ちます。

まず、メールアカウントを作成する必要があります。この例では、Hostingerを使用してcPanelでメールアカウントを作成する方法を説明します。ホスティングサービスプロバイダーは他のアカウント管理システムを使用しているかもしれませんが、基本的なプロセスはほとんどのホスティングサービスで同じです。

ホスティングサービスアカウントにログインし、「Eメール」をクリックして、ドメインの下に新しいメールを作成できるようにします。次に、ドメインの横にある「管理」をクリックします。

email account hostinger

そして、『メールアカウントを作成する』をクリックする必要があります。

そうすれば、WordPressが提供する初期設定ではなく、あなたのドメイン名でビジネスメールを設定することができます。

create email account

簡単なフォームが表示されますので、メールアカウント作成に必要な情報を入力してください。

WordPressのメールを送信するためにこのアカウントを使用するので、wordpress@example.com のようなメールアカウントを作成することをお勧めします。本当に〜してもよいですか?

メール名とパスワードを入力してください。そして「作成」をクリックします。

create email name and password

ここから、接続するサードパーティのメールサービスの設定を求められます。

とはいえ、指定されたサービスを利用したくない場合は、「その他」を選択することもできる。

configure apps and devices

メールの送信を確実に開始するには、WordPress SMTPプラグインの設定にその情報を追加する必要があるため、SMTPホスティングサービスとポートは本当に〜してもよいですか?

SMTP Hostは作成したメールアドレスからメールを送信するためのもので、SMTP Portはセキュアなログインのためのものです。

最後に、『Complete, I’ve set up my client』をクリックしてください。

SMTP host and port

Bluehostや SiteGroundのような他のホスティングサービスを使用している場合は、ホスティングサービスサイトのサポートセクションを参照してください。ほとんどの場合、この情報を提供する投稿があるでしょう。それが見つからない場合は、ホスティングサービスに連絡してこの情報を要求する必要があります。

残念ながら、WordPressには初期設定でビルトインされたネイティブSMTP設定はありません。WordPressでメールのSMTPを設定したい場合は、SMTPプラグインをインストールする必要があります。

WordPress SMTPプラグインを使用すると、あらゆる種類のメールを処理するために作られたサーバーに接続することで、すべてのメールが目的の宛先に届くようになります。信頼性の低いPHPメールシステムを使用するWordPressからのメール送信の初期設定を置き換えることができます。

WordPressでブランドメールアドレスを使う

WP Mail SMTPプラグインをインストールして有効化する必要があります。

WP Mail SMTP website

300万以上のサイトで使用されているWP Mail SMTPプラグインは、WordPressのための最高のSMTPプラグインです。ウェブサーバーからメールを送信するよりもはるかに信頼性の高いプロバイダーを通してメールを送信することで、簡単にメールを修正することができます。

詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化した後、Settings ” Emailでプラグイン設定を行う必要があります。

まず、From Emailフィールドに作成したメールアドレスを入力します。その後、送信者名を入力します。

WP Mail SMTP Settings

次にメーラーを選択します。リターンパスの隣にある「Fromメールと一致するようにリターンパスを設定する」にチェックを入れます。その後、「Return Path」オプションの隣にあるボックスにチェックを入れます。

このオプションは、リターンパスを送信者のメールアドレスと一致するように設定します。このオプションをオフにすると、バウンスメッセージや不達のレシートが失われます。

次に、「その他のSMTP」オプションをクリックして設定します。他のメーラーサービスをご利用の場合は、そちらを選択してください。

Other SMTP

注: WP Mail SMTPの無料版は、SendLayer、SMTP.com、Brevo、Google Workspace、Mailgun、Postmark、SendGrid、SparkPost、およびその他のSMTPをサポートしています。

ただし、Pro版では、すべての無料オプションに加えて、Amazon SES、Microsoft 365/Outlook、Zoho Mailもサポートしています。また、Proバージョンでは、詳細メールログとインスタントメールアラートをオンにすることができます。メールログ記録では、送信されたすべてのメールの記録を残すことができ、メールアラートでは、サイトがメール送信に失敗したときにお知らせします。

次に、SMTPオプションを設定する必要があります。

最初に、先ほどコピーしたSMTPホスティングサービスとポートを入力する必要があります。

この情報はホスティングサービスから入手できます。通常、SMTPホスティングサービスはmail.yourdomain.comです(yourdomain.comを自分のドメイン名に置き換えてください)。SMTPでは、ポート465が一般的に使用されます。

ホスティングサービスによっては、メールアカウントのサインアップ時に暗号化方法を提供しています。

この場合、HostingerではSSL暗号化方式が提供されているので、そのオプションを選択します。しかし、ホスティングサービスによっては、TLSオプションも提供している場合があります。

暗号化方式を選択することは、メールの安全性とプライバシーを確保するために重要です。それがなければ、メール内のコンテンツが傍受され、権限のない第三者に読まれる可能性があります。

smtp host and smtp port

その後、認証トグルをオンにして、SMTPユーザー名とパスワードをプロバイダーに入力する。通常、メールアドレスはSMTPユーザー名でもあります。

次に、SMTPアカウントにパスワードを設定してください。

SMTP username and password

1Passwordのようなパスワード・マネージャーを使えば、いつでも安全にパスワードを管理できる。

Save Settings(設定を保存)」ボタンをクリックして、変更内容を保存することを忘れないでください。

save settings

他のメーラーサービスを利用している場合、そのサービスをバックアップ接続として追加できることを覚えておいてください。つまり、最優先の接続を使用してメールの送信に失敗した場合、WP Mail SMTPは自動的にバックアップ接続を使用してメールの送信を再試行します。

他のメーラーサービスを追加したい場合は、上のスクリーンショットにある「追加接続」リンクをクリックするだけで、WP Mail SMTPがその方法を案内してくれます。

Hostingerをお持ちでない場合、これらの手順は少し違って見えます。その場合は、どのホスティングサービスでもWP Mail SMTPをセットアップする方法についての究極のガイドをご覧ください。

SMTP設定のテスト

WP Mail SMTPを設定してメールを送信できるようになったので、すべてが問題なく機能しているかテストしてみよう。WordPress 管理画面のWP Mail SMTP ” Toolsにアクセスしてください。

Eメールテスト」タブで、テストメールを受信したいEメールアドレスをプロバイダーが入力する必要があります。これは、あなたがアクセスできる正しいメール・アドレスであれば何でもかまいません。

HTMLボタンを’ON’に切り替えて、メール送信ボタンをクリックしてください。

send a test email

WP Mail SMTPは先ほど入力したSMTP設定を使ってメールを送信します。

受信トレイを確認すると、メールが正常に送信されたことを知らせる成功メッセージが表示されているはずです。

WP SMTP success message

WordPressメールのトラブルシューティング

SMTPを使用したメール送信でエラーが発生する最も一般的な原因は、SMTPホストまたはポートが正しくないことです。

ホスティングサービスが提供する正しいホスティングサービスとポート設定を入力していることを本当に〜してもよいですか?

smtp host and smtp port

正しい暗号化方式を選択していることを本当に〜してもよいですか?

通常、SSLはほとんどの環境で動作しますが、メールが届かない場合はホスティングサービスに確認することをお勧めします。

メールを手動で再送する

SMTP設定エラーがない場合でも、一時的な問題が発生することがあります。

例えば、受信者のメールサーバーが原因でメールがバウンスしてしまったり、メーラーサービスが1日に送信できるメール数に上限を設けている可能性があります。一定時間内に送信可能なメール数を超えると、メールが拒否されることがあります。

その場合、特定の受信者に再送信するだけです。すべて、WP Mail SMTP ” メールログにアクセスしてください。

再送信に失敗したメールの横にあるボックスにすべてチェックを入れ、一括操作ドロップダウンメニューで「再送信」オプションを選択し、「適用」をクリックするだけです。

resend emails

その後、選択したメールを再送信するかどうかを確認するポップアップメッセージが表示されます。

はい』ボタンを押してください。

heads up message

最後に、メールがキューに入っており、まもなく再送されるという確認メッセージが画面に表示されます。そして、『OK』をクリックする。

これで完了だ!これで、SMTPサーバーを使ってWordPressメールを送信する方法がわかりました。

ok button

WordPressメールにウェブホスティングのメールサーバーを使う利点と欠点

何よりもまず、WordPressのメール送信にWebホスティングサービスのサーバーを使用する最も明白な利点は、独自のブランドのメールアドレスを使用できることです。

もう一つの長所は、ホスティングサービスにサインアップする際に、すでにこのサービスの料金を支払っていることです。メールの送受信に追加料金を支払う必要はありません。

しかし、一部のWordPressホスティングサービスプロバイダは、送信メールに制限を課しています。そのため、WordPressを使用してニュースレターメールを送信することはお勧めせず、トランザクションメールのみにSMTPを使用することをお勧めします。

共有ホスティングサービスプロバイダーのもう一つの一般的な問題は、メールサーバーの信頼性がかなり低い場合があることです。もしメール配信の遅延に気づいたら、Google Workspace、Mailgun、SendGridのようなサードパーティのメールサービスの利用を検討すべきです。

この投稿が、WordPressのメール送信にSMTPサーバーを使用する方法を学ぶのにお役に立てば幸いです。また、ビジネスで必須のWordPressプラグインのリストや、無料のビジネスメールアドレスの作成方法もご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

27件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. MH says

    If there have any option to configure multiple email as SMTP ?
    I have two contact form and need to email sent from different email address.

    • WPBeginner Support says

      You would want to check with the support for your contact form to see what is available.

      管理者

  3. khatamband says

    I used today WP Mail SMTP
    I used google apps for smtp authentication and testing it with test
    but if I fill website fom, no mail is received
    I also tried hosting email address for smtp authentaction. This was also successful in sending test mail, but for form mail — no mail received, although giving success output.
    I also checked spam folder for both, nothing there too.

    So where can be the issue

  4. Sean says

    Hi when i passed the code into the wp-config file my site stopped working, then i removed it and it still not going up.
    Please help!!

    • WPBeginner Support says

      Hi Sean,

      Are you seeing an error or just white screen? Here is how you can replace your existing wp-config.php file with a fresh copy.

      First, you need to connect to your website using an FTP client and download a copy of your wp-config.php file to your computer as a backup.

      Next, you need to visit download a copy of WordPress from WordPress.org. You will need to unzip it, and inside you will find a file called wp-config-sample.php. Rename this file to wp-config.php.

      Now open the wp-config.php file you saved earlier as the backup. It contains your WordPress database information. Like database name, password, host, table prefix, etc.

      Copy the information from your backup to the new wp-config.php file and then upload the new file back to your server using the FTP client.

      管理者

      • Sean says

        Hi I just found the problem. There was missing space in the first line.
        It’s strange cause I never edited it.. but everything is fine now. Thanks for quick response.

  5. Abby says

    Hi:

    we are setting up a WordPress multi-site server. Our concern is if we use WordPress SMTP email how do we lock it down to ensure that it is not turned into an email spam bot? We occasionally experience DDOS attacks that are obviously looking for and scanning our existing business network for vulnerabilities and we do not want to give them a point of entry through the new WordPress multi site server. At present we use a self hosted exchange server for email and we have port 25, 465 and 587 locked down.

    Thanks
    Abby

  6. Beata Raju says

    Hi,
    Thank you for the article, it’s really helpful. I’ve have a WordPress site hosted by HostGator with a shared server subscription. Do you know whether their email service is reliable or not? I’ve somehow managed to hook up my @mysite email address to outlook.com webmail but it does take forever for emails to come through. Do you think I should try another solution?
    Many thanks in advance,
    Beata

  7. Michael says

    Sadly this option is not available in cases where GoDaddy is the host, as the blocks all outbound SMTP to ports 25, 465 and 587 to all servers except their own. :(

    Trying Amazon SES per helpful comments above.

  8. Anssi says

    Hi!
    Any tips how to speed up the sending process when using SMTP? CF7 form takes up to 10 seconds when using SMTP and 1-4 senconds while using PHP Mailer.

  9. Wendy says

    Hi, i am new to wordpress.
    I am trying to configure email address using own company email.
    It was tested successfully while setup.
    But it prompt error when trying to submit request during the website.

  10. Will says

    Yes! This is the way to do it. In my case I use hostgator so it’s mail.mydomain.com and port 25 (standard email port). I was trying to use gmail and it didn’t work. I’m not sure why my site stopped working for the built in php mail even though it works on other domains on the same account.

  11. Lynn Dye says

    This is very timely. I’ve been struggling with this on behalf of a client. When I talked them into using the built-in email of their host along with setting up domain-branded email, it took care of most problems.

    The other problem we’ve been having is getting notification emails to go to a yahoo email address. These have failed with an error message ‘not able to reach the server’, or perhaps a time-out of the server. I had that recipient get a gmail address for notifications to go to, but we’ve not seen the results yet.

    Just an PSA to folks – when I was digging into why folks with the yahoo and aol emails were not getting their notifications, the Gravity Forms folks had in their forum an article on why notifications may not be going out. Seems AOL & Yahoo have very stringent rules on accepting emails from something that looks spammy (the acronym was DMARC), I believe. So when I got one business to get rid of AOL, their problems cleared up. The other business uses Yahoo for their business email (yes, people still do it). They were not getting notified regularly and that’s why I asked them to set up a gmail.

    I will also be using some of the suggestions in this article to hopefully permanently fix this problem.

  12. Firdaus Azizi says

    Used to be using WP Mail SMTP with Gmail. But since it’s not supporting oAuth, I’m now using Postman SMTP.

    I find Postman SMTP is more user friendly + it has a log file for us to check all the emails that are being sent.

  13. sazia kazia says

    Excellent article we really need this to set up email for wordpress. I will definitely try this thanks for sharing. :)

  14. Maggew says

    Decent article yo. SMTP is great if you don’t send out more than 500 emails a month.

    On my site, I use Amazon SES to deliver all mail. It’s affordable at like 10,000 emails for $1 and it’s 100% guaranteed to deliver into the inbox (assuming you setup / configured properly).

  15. Jeff Cohan says

    I appreciate the tutorial. However, at this writing, the WordPress dot org plugin page for WP Mail SMTP shows that the newest version of the plugin (a) hasn’t been updated in 12 months; (b) is compatible only up to WP 4.0.8, and (c) is broken (6 of 8 votes) for WP 4.3.1. What do you advise?

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。