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送信メールの送信者名を変更する方法

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

WordPress送信メールの初期設定送信者名とメールアドレスを変更しますか?

初期設定では、WordPressの通知メールの送信者名はすべて「WordPress」となっています。これはプロフェッショナルには見えませんので、あなたのビジネス名やお好みのカスタマイザー名に変更するとよいでしょう。

この投稿では、WordPressの送信メールの初期設定である送信者名とメールアドレスを簡単に変更する方法をご紹介します。

Changing sender name and email address in outgoing WordPress emails

WordPressで初期設定の送信者情報を変更すべき理由とは?

WordPressは、サイト管理者だけでなく、サイトの他のユーザーにもいくつかのメール通知を送信します。

これには、パスワード忘れメール、サイトエラーや回復メール、新規ユーザー登録などの重要なメール通知が含まれます。

初期設定では、送信者名として「WordPress」、送信者のメールとして存在しないメールアドレス(wordpress@yourdomain.com)が使用されます。

多くのスパムフィルター機能は、WordPressのメールを迷惑メールと判断してブロックします。時には、スパムフォルダーにすら入らず、フィルターによってすぐに削除されてしまうこともあります。

このトピックについては、WordPressでメールが送信されない問題の解決方法をご覧ください。

送信メール通知は重要であり、自社のブランドとメールアドレスを使うべきである。そうすることで、ブランドの信憑性が増し、ユーザー間での知名度も上がります。

例えば、オンラインストアを運営しているのであれば、カスタマイザーに送信者名をショップ名としてメール通知を受け取りたいでしょう。

サイト用の無料ビジネスメールアドレスを5分で取得する方法については、こちらのガイドをご覧ください。

それでは、WordPressのメール通知の送信者名とメールアドレスの初期設定を変更する方法を見てみましょう。

このチュートリアルでは、複数の方法について説明しました。以下のリンクからお好きな方法にジャンプしてください。

方法1.WP Mail SMTPを使って初期設定の送信者名とメールを変更する。

この方法は簡単で、すべてのWordPressユーザーにお勧めします。

この方法では、WP Mail SMTP Proプラグインを使用します。これは、300万人以上のサイトオーナーに使用されている、最高のWordPress SMTPプラグインです。

WP Mail SMTP

このプラグインを使うと、WordPressで送信するメールの初期設定の送信者名とメールアドレスを簡単に変更することができます。WordPressのメール到達性の問題を解決するのにも役立ちます。

まず、WP Mail SMTP Proプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化したら、WP Mail SMTP ” Settingsにアクセスしてプラグイン設定を行います。最優先の接続」では、WordPressのメール送信に使用するメールアドレスと名前を入力します。

Change sender name and email in WordPress using WP Mail SMTP

以下に、WordPressのメールを送信するSMTPサーバーを設定するオプションを示します。初期設定では、プラグインはWordPressホスティングサービスが提供するPHPメソッドを使用しますが、これは信頼性が低いです。

WordPressのメールを適切に送信するために、リストアップされたSMTPサービスのいずれかを使用して、到達性を保証することをお勧めします。

Select SMTP Mailer

SMTPサービスを選択した場合は、画面の指示に従ってプラグインとSMTPサービスプロバイダーを接続してください。

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

WordPressメールのテスト

WP Mail SMTP Proでは、WordPressのメール設定をテストすることもできます。WP Mail SMTP ” Toolsページに行き、’Email Test’ タブに切り替えるだけです。

Test WordPress emails using WP Mail SMTP

ここから、アクセス可能なメールアドレスをプロバイダーに入力し、「メールを送信」ボタンをクリックするだけです。

プラグインは、あなたが提供したアドレスにテストメールを送信します。受信トレイでWordPressのメールが受信できるか、送信者名と送信者メールアドレスが正しいか確認できます。

WP Mail SMTPは、WooCommerceWPFormsなど、WordPressで人気のプラグインすべてで動作します。

詳しい手順については、WordPressのメール送信にSMTPを使用する方法の投稿をご覧ください。

方法2: WP Change Email Senderを使って初期設定の送信者名とメールを変更する。

この方法は、SMTPサービスを使用していない場合、または最初の方法がうまくいかない場合にのみお勧めします。

この方法を使用しても、WordPressメールの到達性が向上したり、メールのトラブルシューティングが簡単になるわけではありません。しかし、WordPressのメールが機能している場合は、送信者名とメールアドレスを変更することができます。

まず、WP Change Email Senderプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化した後、WordPress管理エリアの設定 ” 一般ページに移動する必要があります。下の方に「送信者名」と「送信者メールアドレス」の欄があります。

WP Change Email Sender

WordPressの送信メールに使用する名前とメールアドレスを入力します。

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

これですべてです。WordPressの通知メールに、プラグイン設定で入力した名前とメールアドレスが表示されるようになります。

プラグインにはメール設定をテストするためのプロバイダーはありません。新規ユーザーの作成、パスワードリセットのリクエストなど、WordPress通知メールを生成するアクションを実行することで可能です。

方法3:WPCodeを使って送信者名とメールアドレスを変更する。

送信者名とメールアドレスを変更するもう一つの優れた方法は、コード・スニペットを追加することです。WordPressにコードを追加する最も簡単で安全な方法であるWPCodeをお勧めします。

通常は、functions.phpファイルにコードを追加する必要がありますが、WPCodeを使えば、数回クリックするだけで、簡単にこのコードスニペットを追加することができます。

それだけでなく、WPCodeはあなたのサイトをカスタマイズするのに役立つ他の多くのスニペットを持っています。さらに、カスタマイザーも簡単に追加することができます。

まず、無料のWPCodeプラグインをインストールする必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

次に、Code Snippets “ Add Snippet to your WordPress admin dashboardをクリックします。検索バーに’sender’と入力し、’Change Outgoing Email Sender’の下にある’Use snippet’ボタンを押してください。

WPCode Use Snippet

すると、スニペットの編集ページに移動します。

ここで、コード・スニペット内の送信者のメールと名前を更新する必要がある。

WPCode Edit snippet

次に、トグルを「有効化」に切り替え、「更新」ボタンをクリックする。

WPCodeを使用する利点の一つは、事前に作成されたスニペットでいっぱいのライブラリが付属していることです。自動更新を無効化したり、SVGファイルをアップロードできるようにしたり、初期設定のブロックエディターの代わりにクラシックエディターを使用したりなど、サイトの他のプラグインを置き換えるものが見つかる可能性が高いです。

ライブラリを使用する必要はありません。また、ライブラリを検索する代わりに「カスタムコードを追加(新規スニペット)」ボタンを選択することで、必要な他のコードを追加することもできます。

Add New Custom Snippet

あとはすべて、自分のコードを貼り付け、サイト上のどこに表示するかを決めるだけだ。

例えば、以下のスニペットをコピー&ペーストして、WPCodeのカスタムコードスニペットに貼り付け、送信者名とメールを変更するようにカスタマイズすることができます。

// Please edit the address and name below.
// Change the From address.
add_filter( 'wp_mail_from', function ( $original_email_address ) {
	return 'tim.smith@example.com';
} );

// Change the From name.
add_filter( 'wp_mail_from_name', function ( $original_email_from ) {
	return 'Tim Smith';
} );

ボーナス:WordPressでフルネームを変更する

メールの送信者名を変更する以外にも、WordPressではフルネームを変更することもできます。これは、あなたが書いた投稿に表示される名前です。

もしあなたのサイトに「jsmith204」のような専門的でないユーザーネームがあれば、サイトの信頼性に悪影響を与え、ユーザーのブログへの訪問意欲を削いでしまいます。

その場合は、WordPressのダッシュボードからユーザー ” プロフィールのページにアクセスして、ユーザー名を変更することをお勧めします。

ここで「名前」セクションまでスクロールダウンし、ファーストネーム、ラストネーム、ニックネームを追加する。

次に、「Display name publicly as」ドロップダウンメニューをクリックし、新しいユーザー名を選択します。

完了したら、「変更を保存」ボタンをクリックして設定を保存します。詳しくは、WordPressでフルネームを追加・変更する方法のチュートリアルをご覧ください。

WordPressの送信メールの送信者名とメールアドレスを変更する方法について、この投稿がお役に立てれば幸いです。WordPressのメール設定に関する他のWordPressガイドもご覧ください。

メール設定のための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

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

  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. Afshan says

    Its updating contact form 7 sender name and email.
    How to make it only applicable for core WordPress emailing not for contact form 7?

    • WPBeginner Support says

      You would need to uncheck the force email and reach out to your contact form’s support for how to set it in the plugin.

      管理者

  3. Cameron Johnson says

    Hey thanks for the code it works amazing! Is there a way to change the email sender name for only the new order email and remain the rest of them the same? Thanks!

    • WPBeginner Support says

      For that, you would want to reach out to the support for the ecommerce plugin you’re using for if they have an option to set that up.

      管理者

  4. Jonathan says

    Hi I tried out the method of adding the code snippet to my functions. One problem that came up is that now my site is sending an extra email with no subject or content(only a blank template) along with the other notifications. After removing the code snippet it still sends these emails. After removing the code do I need to run a remove_filter() or something similar?

    • WPBeginner Support says

      You would want to check that it isn’t being sent by one of your other plugins, this code should only change the values for the sender name. What the code modifies would be removed when you remove the code.

      管理者

  5. Felipe says

    I used the Snippets plugin and it did update the from address and the name, but the name shows “my name, WordPress” Any idea what could be causing it?

    • WPBeginner Support says

      You may want to ensure you set the sender email as well to ensure that isn’t part of the issue.

      管理者

  6. Mrunal says

    I copy pasted this code into my theme’s functions.php file. Changed the email address and the name. then when i try to refresh the page, I saw the code being displayed on top of my website. I tried using the plugin as well. and the plugin didn’t work either. Please help.

    • WPBeginner Support says

      For the code not working, you would want to ensure the code is not after a ?> in your functions.php file. For the plugin not working you may want to reach out to the plugin’s support for them to take a look at possible conflicts.

      管理者

  7. Reza Baleghi says

    I just pasted the code and changed it as I wanted.
    It works perfectly!
    Thanks for saving lots of time. :-)

  8. M Asif Raza says

    Fantastic. Its really worked for me and I have done what I wanted in few minutes. Thanks for this Blog Post :)

  9. Ruth says

    This works perfectly, but too well!

    It overrides the from address in Gravity Forms notifications. Is there a way to only have it apply to the network administrator? We have a WordPress network, not a single site.

    • WPBeginner Support says

      You would want to reach out to the plugin’s support for preventing it from overriding your forms for what it sounds like you’re wanting.

      管理者

  10. TH says

    Hi.
    The emails sent from my wordpress website show extra information for the sender name ‘myemailname via msv40-sh-cicadas.mschosting.com’

    How do I remove the ‘via msv40-sh-cicadas.mschosting.com’?

    How do I set it up my site’s email so that it only shows myemailname?

    I have done email authentication on my cpanel.
    I deactivated all plugins to check but still the same.

    Thanks for the help.
    TH

  11. MELLOR says

    Hi thanks for putting this in. It works for anything that doesn’t populate these fields, as per Gravity Forms example above, but because this is an output filter it changes anything you send to these values.

    I can code but not WordPress, but I will take your template code above and pop in a conditional test for the known wordpress values…

    if $original_email_from = “WordPress” then change it,

    likewise if $original_email_address = “wordpress@” then change it.

    Otherwise leave well alone.

    Then it will work for any calling plugin that does fill these or any of these fields.

    I chose to change the core code, unfortunately, JETPACK puts these values back in when it calls wp_mail so my default value change was useless because they only changed if the values where not given….lol

    On the flip side, the FILTER you gave above comes in AFTER everything else, so it obliterates even the values from plugins like Gravity.

    So if anyone can code the conditional statement – only change if it contains the values “WordPress” (and possibly any derivatives) then that will definately fix all scenarios.

    If there’s no one to hand, then I will possible get it done in a while for my own site so that it doesn’t look like a phishing site whenever it emails anyone… lol because the from name won’t match my identity or domain or ssl certificate. Until then I have switched off JetPack.

    Many thanks for the base code, it will really help me work out the rest.

  12. Bryan says

    Hi Syed, I noticed that while it works for other notifications, it didn’t work for the initial new user registration email. When a new user registers on my site, it is still not using the updated sender namer and email. Do you know why?

  13. Aurélien Denis says

    I’ve been using this method for years… but be careful it’s not compatible with plugins like Gravity Forms who already change this.

    • WPBeginner Support says

      If you are using a contact form plugin like WPForms or GravityForms, then you can set sender name and email address in plugin settings. However, this is mostly used by the emails sent by the plugin and not for the WordPress notification emails.

      管理者

  14. plu2 says

    Thank you for this great tip.

    For user friendliness you could consider removing the line numbers in the method 2 code.

返信を残す

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