Support » Fixing WordPress » 2.0 – emails from wrong address

  • Resolved eveums


    I just updated to WP 2.0. The problem I’m having is that my blog is now sending messages via an incorrect email address.

    Previous behavior: A comment would arrive from the sender’s email address. A comment to be moderated would arrive from my gmail address, specified in Options.

    Current behavior: A comment arrives from “wordpress@[mydomain].com.” A comment to be moderated arrives from “wordpress@[mydomain].com.” I have not set up a “” address.

    I’ve checked my user settings, and the email address is properly set to the gmail address. Is the new behavior a change in 2.0? How can I change this back to the old method?


Viewing 11 replies - 1 through 11 (of 11 total)
  • Anyone have any ideas, please?
    Thanks in advance.

    I’m having the same problem….
    Any ideas?

    I found the fix here:

    But I’m not sure where to insert the code.

    Does it go in wp_mail.php or wp_register.php and if so, where exactly does it go?

    I’m a total newb…


    yeah, that really is annoying… i only get that when there is a comment to be moderated…the other way works fine…


    You edit pluggable-functions.php line 119.

    Thanks to #wordpress on IRC!

    I tried this, and it didn’t work.

    Specifically, the “please moderate comment” message comes from the correct Admin email address. The moderated comment still comes from “” instead of the commenter’s email address.

    Quite frustrating for a blogger who responds to comments…

    I’m assuming there must be one more function to edit, but I don’t know enough about WP to even guess as to which one it would be. Any help would be greatly appreciated.

    The earlier solution only corrects the sender address in a registration email.

    If you hit reply to a comment notification the reply address is actually the poster’s address.
    To show the poster’s address in the ‘From’ field of the notification email:

    1. Open pluggable-functions.php
    2. Change <$wp_admin> in line 290 to: <$comment->comment_author_email>


    <Geeky Excitement! I’m starting to get PHP! (I’m 90 Pages in to PHP5 and MySQL Bible.)>

    Awesome! Thank you so much for the help… but I’m still confused. Here’s the code, with lines above and below 290…

    $wp_email = 'wordpress@' . preg_replace('#^www.#', '', strtolower($_SERVER['SERVER_NAME']));

    if ( '' == $comment->comment_author ) {
    [line 290] $from = "From: "$blogname" <$wp_email>";
    if ( '' != $comment->comment_author_email )
    $reply_to = "Reply-To: $comment->comment_author_email";
    } else {
    $from = "From: "$comment->comment_author" <$wp_email>";
    if ( '' != $comment->comment_author_email )
    $reply_to = "Reply-To: "$comment->comment_author_email" <$comment->comment_author_email>";

    Am I missing something? I don’t see $wp_admin… Help! 🙂



    Thank you SOOOOOOOOOO much for your help!! This board is very lucky to have someone as knowledgeable and gracious as you helping out.

    Thanks again for your attention! 🙂

    hello, i’m using wordpress 2.02 and made the change of <$wp_email>
    <$comment->comment_author_email> in my pluggable-functions.php file but my comments are still coming back from the server default.

    Please advise, thanks


Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘2.0 – emails from wrong address’ is closed to new replies.