Contact Form

Hi, i have a form on my wordpress site that allows a parent to send a message (email) to their child where it shows up as from the tooth fairy.

Basically the form is sent to the email address that is entered for the child, however when it lands in the child's inbox, it shows as from Wordpress, but when you click into the email it is from

Do you know how i could change the 'Wordpress' to show as 'Tooth Fairy'.

I am using a wordpress plugin called Contact Form 7
Who is Participating?
Jason C. LevineConnect With a Mentor No oneCommented:
There is a better answer than Ray's for WordPress.

Just add the following code to functions.php:

/** changing default wordpres email settings */
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
 return 'your email address';
function new_mail_from_name($old) {
 return 'your name or your website';

Open in new window

Ray PaseurCommented:
The From: part of the email address is settable.  See the "additional parameters" information on this page:
oo7mlAuthor Commented:
Thanks Ray, i have my site email entered in the From field
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
It depends on your hosting sometimes.  Some hosts put in their own email address if the email account you are trying to send from is not a valid email account on their servers.  This is done to ensure that the email can be traced if it turns out to be spam.

The simple solution is often to create an email account on your hosting with the name you want to use to send the email from.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.