In a previous post, I discussed the ease of filtering the “from” address that wp_mail will send email from. This was done using a filter added to your theme’s functions file (functions.php). I always prefer using the functions file for simple filters and actions as a plugin is often overkill for what is necessary.
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 to make edits. This would add considerable unnecessary bloat to the file. Simply edit the returned values for email address and name in the file prior to saving. This results in a light weight and efficient plugin.
I have created the needed code for this “quick-and-dirty” plugin. To implement, follow these steps:
- Save this file as a .php file.
- Open it in your favorite editor (or notepad).
- Change the email name and address in the functions to the name and address you want your email coming from.
- Save your changes.
- Load to your plugin folder.
There are several other plugins that accomplish this 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 it.

Sweet ! You saved me. This was very helpful, keep the good work.
Doesn’t work for me sadly, WP 3.2.1
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.
First, Chad, thank you!
Dez,
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!
C.
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.
Grtz,
Kurt
hey can you show me exactly where on the php file i have to change to my email.