Support » Plugin: Comment Approved » How to configure the sender email address and name

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Rick Sportel

    (@ricksportel)

    Can you help me?

    Thread Starter Rick Sportel

    (@ricksportel)

    Hello?

    Thread Starter Rick Sportel

    (@ricksportel)

    Please solve this.

    Plugin Author nielsvanrenselaar

    (@nielsvanrenselaar)

    Because it uses the default wp_mail function of WordPress. You can use filters for this;

    https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from_name
    https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_mail_from

    I’ll add it to my feature request list though.

    Thread Starter Rick Sportel

    (@ricksportel)

    Hello Niels,

    Thank you very much. I didn’t know that 🙂

    I tried this and it works fine. Added these two rules to my set of theme functions:

    add_filter( 'wp_mail_from_name', function( $name ) {
    	return 'Sender name';
    });
    add_filter( 'wp_mail_from', function( $email ) {
    	return 'sender.name@senderdomain.com';
    });
    Plugin Author nielsvanrenselaar

    (@nielsvanrenselaar)

    It’s now also a feature in the plugin, enjoy!

    Thread Starter Rick Sportel

    (@ricksportel)

    Hello Niels,

    It’s not working as it should be working. I installed the new version of Comment Approved and configured ‘sender from name’ and ‘sender email’.

    As a result whenever a comment is being approved, the emails are being sent to the configured ‘sender email’ instead of the commenter email address.

    Also my previous posted solution, adding filters to the functions.php, is not working as I hoped. For example I use Contact Form 7 for email contact forms. Every message sent by a CF7 form gets delivered with the name and email set in functions.php, instead of the sender name and email.

    Any more options to try?

    Rick

    Thread Starter Rick Sportel

    (@ricksportel)

    Niels,

    That was a mistake, I’m sorry!

    I was logged in when I commented for testing and that’s why the emails were sent to our main email address. Used the wrong email address to comment… 🙁

    Works fine! Thank you for updating the plugin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to configure the sender email address and name’ is closed to new replies.