Solved

Contact Form

Posted on 2014-01-07
4
397 Views
Last Modified: 2014-01-13
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 hello@mydomain.com

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

I am using a wordpress plugin called Contact Form 7
0
Comment
Question by:oo7ml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39762604
The From: part of the email address is settable.  See the "additional parameters" information on this page:
http://php.net/manual/en/function.mail.php
0
 

Author Comment

by:oo7ml
ID: 39762612
Thanks Ray, i have my site email entered in the From field
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 400 total points
ID: 39762617
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

0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 100 total points
ID: 39762885
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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question