WordPress Email Settings: Changing the wp_mail address with a simple plugin

The ability to customize WordPress email settings in the admin panel is essentially non-existent.  So what if you want to change the default email address that WordPress sends email from.  Generically this is [email protected], and who wants that?  I know I don’t.  You probably don’t either.

In a previous post, I discussed how you can change your WordPress email settings to change this address with a simple filter snippet added to your theme’s functions.php file.  That’s my preferred method of customizing WordPress.

But what if you are a person that prefers the ease of loading a plugin to do your bidding? Well, adding these filters as a plugin is as simple as taking those filters, applying the appropriate plugin header, saving it as a php file, and loading it to your plugins folder.

Note: this particular process does not make use of admin panels.  While that makes for a nice interface for your WordPress email settings, it would also add needed bloat to the file. Simple edits to the email settings for the email address and name prior to saving is all you need for this project.  This results in a light weight and efficient plugin with the email settings you need.

I have created a code snippet you can use for this “quick-and-dirty” email settings plugin.  To implement, follow these steps:

  1. Save this file as a .php file.
  2. Open it in your favorite editor (or notepad).
  3. Change the email name and address in the functions to the name and address you want your email coming from.
  4. Save your changes.
  5. Load to your plugin folder.

There are several other plugins that can manage WordPress email settings with more features, so if that is what you are looking for, by all means, search the wordpress.org plugin directory.  But if you want something simple and light, this will do the trick!

For more information on testing, troubleshooting, and changing your WordPress email configuration for wp_mail, here are some additional posts:


    • says

      Dez – thanks for the comments, but you would have to be doing something wrong if it’s not working for you. This is nothing more than a filter for an internal WordPress function that is (and has been) pluggable for quite a number of versions and hasn’t changed (nor would I expect it to for the forseeable future – including 3.3 which I am beta testing now). I would suggest rereading the instructions and make sure you didn’t miss something.

  1. says

    First, Chad, thank you!

    Do the next steps :

    1. make a folder in a plugin directory named “quick-and-dirty”
    2. upload the file php modified from above in it
    3. activate the plugin

    It works!
    Thank you again Chad!

  2. Kurt says

    Hello Chad,
    I’am desperate.
    The last days I try to create this filter

    I follow the steps in the other articel. But it dosn’t work.

    Now I read this and see the link: http://butlerblog.com/wp-downloads/qnd-wp-mail.phps

    I think that I nead somethink like this to put in the wp-members-pluggable.php ?

    The Members plugin is fantastic for me in the basic function, but I need to change a few things.

    1. A redirect after login to a members page.
    2. A logout redirect to my blog.
    3. When someone is not yet a member than can find a page and scroll around. Basicly when they click on a category the system tell them that they have to be a member. Thats ok, BUT the system basically shows also the registration form. In my case the registration form have only to be shown after payment.

    Can you help me out of this, please.



  3. says

    Thank you, worked perfectly on the lastest WP update, 3.5.2.

    The thing that was throwing me off at first was I didn’t realize that I had to go back into the plug-in directory in the admin panel and then activate it for it to work. For those who are unfamiliar with manually installing plug-ins you might want to add those two additional steps.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>