Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Set ”From” name and email

Viewing 3 replies - 1 through 3 (of 3 total)

  • BookClubReader
    Participant

    @bookclubreader

    I have the same problem. Were you able to figure out how to solve this? If so, please post the solution here.

    Thanks


    BookClubReader
    Participant

    @bookclubreader

    I spoke too soon. I found the answer here – Contact Form 7 – From Name Incorrect

    Here’s what solved it for me:

    remove_filter('wp_mail_from', 'bp_core_email_from_address_filter' );
    remove_filter('wp_mail_from_name', 'bp_core_email_from_name_filter');

    I added this to my function file. If you have Genesis Extender, it’s easy to do.


    danbp
    Participant

    @danbp

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Set ”From” name and email’ is closed to new replies.
Skip to toolbar