Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Set ”From” name and email

@danbp

Participant

Thank you for your reply @bookclubreader.

But the first topic is related to Contact Form 7, and your soluce applies to that plugin ONLY.
Also, the tip you linked to use a core file hack, and this is absolutely not to do.

If users who don’t use that plugin go to remove both filters, their emails won’t NEVER be send i guess.
https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from

For thoose who want to modify the default sender name (from), typically wordpress@yourdomain to something else, use these snippets and put them into your child-theme functions.php

//notification mail  From email field
function custom_email_from($mail) {
	$mail = 'your_email@addre.ss'; // Replace the email address here //
	return $mail;
}
add_filter('wp_mail_from','custom_email_from');

//notification mail From name field - optional

function custom_email_from_name($name) {
	$name = get_bloginfo('name');//or any other text
	return $name;
}
add_filter('wp_mail_from_name','custom_email_from_name');

MOD EDIT: Topic moved into Third Party Plugins section

Skip to toolbar