WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 2.0 - emails from wrong address (12 posts)

  1. eveums
    Member
    Posted 8 years ago #

    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 "wordpress@mydomain.com" 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?

    Thanks!!

  2. eveums
    Member
    Posted 8 years ago #

    Anyone have any ideas, please?
    Thanks in advance.

  3. mwolfgang
    Member
    Posted 8 years ago #

    I'm having the same problem....
    Any ideas?

  4. mwolfgang
    Member
    Posted 8 years ago #

    I found the fix here:

    http://trac.wordpress.org/ticket/1164

    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...

    Thanks,
    Matt

  5. Kahil
    Member
    Posted 8 years ago #

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

    hmmm

  6. mwolfgang
    Member
    Posted 8 years ago #

    You edit pluggable-functions.php line 119.

    Thanks to #wordpress on IRC!

  7. eveums
    Member
    Posted 8 years ago #

    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 "wordpress@server.com" 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.

  8. mwolfgang
    Member
    Posted 8 years ago #

    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>

    Voila!

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

  9. eveums
    Member
    Posted 8 years ago #

    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! :)

  10. mwolfgang
    Member
    Posted 8 years ago #

    OOps..
    <$wp_email>
    to
    <$comment->comment_author_email>

    Matt

  11. eveums
    Member
    Posted 8 years ago #

    Matt,
    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! :)

  12. wayne12
    Member
    Posted 8 years ago #

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

    Please advise, thanks

    wayne

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags