• Resolved brittanie

    (@brittanie)


    I’ve noticed I have not been receiving e-mail notification of comments, unless I MYSELF am posting the comment. Finally, I realizd this was the problem a€??

    From my server:

    “When you send email with a Perl or PHP script, you will need to make sure that the “From:” address in your email header is set to an address within your domain name. If the address is set to an external email address, then you will see an error in your /tmp/mailError.log file. For example:

    2003 Jun 18 21:18:15 Result: 9
    2003 Jun 18 21:18:15 From address not in member domain. Message not sent.”

    I have been getting this error. When I post a comment it gets sent to me bacause my e-mail address is of course in my domain. Also, if I disable the “email required to post a comment” function in Discussion Options and post an anonymous comment without an e-mail address I get the notification. But if anyone else posts a comment and uses their own email the mail gets caught up.

    So, I think I have two options. I can edit the comment form to remove the e-mail field so this stops happening, but I don’t really want to do that, for security reasons. Or, I can try to edit the mail() funnction so the From field in the email header is always MY email address.

    Or, perhaps I can fix the To field, not the From? I think in 1.5.2 the mail() function is in pluggable functions? But I still have no idea how to edit this so everything works.

    Any ideas would be greatly appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The wp_mail() function in 1.5.2 is in pluggable-functions.php.

    It sends all emails with the From: header set to the blog admins email address – therefore if this is an address within your domain everything should be fine.

    Hope this helps

    Thread Starter brittanie

    (@brittanie)

    I thought that was for outgoing comments only, as in reader notification of new posts, etc. When someone posts a comment and fills in their e-mail addy (which I currently have set as a requirement) then the notifcation email that is (supposed) to be sent to my inbox shows up as having come from the commenter’s e-mail. That is why I am only notified when I comment – the sender’s addy is part of my domain.

    I think perhaps what I should be looking for instead of mail() is the notify author function? I have no freakin’ idea…

    Brittanie–how about in pluggable-functions.php where it defines:

    function wp_notify_postauthor

    .
    .

    if ('' == $comment->comment_author_email || '' == $comment->comment_author) {
    $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>';
    } else {
    $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
    }

    Now this is a stretch for me-so backup your pluggable-functions.php!! Then try changing that last line to:

    $from = 'From: "brittanie" <[email protected]>';

    Thread Starter brittanie

    (@brittanie)

    Mickael, you have just made my day! It totally works, and was exactly what I was looking for, so far (I just posted a test comment). I’m getting notified, e-mail is still required to post a comment, and the poster’s e-mail addy is included in the comment notification, although not “from.”

    You, my friend, are the cat’s meow.

    Looks like this could also be solved with this plugin:
    https://www.coffee2code.com/archives/2004/06/28/plugin-wpphpmailer/

    dtclarinet

    (@dtclarinet)

    I am the admin and my email address contains my domain name, but I don’t get emails when comments are posted, even when posted by me. No comments are in moderation, all show on the site. but no emails arrive. a week ago I was getting them and they suddenly stopped. nothing has changed.

    dtclarinet

    (@dtclarinet)

    I think I may have solved the problem. I believe some files became corrupted somehow. I re installed several, including the “comments” file from the theme I’m using.

    dpurcell

    (@dpurcell)

    Thanks to whoever posted the wpphpmailer plug-in, it solved my problem!

    Hi, I have a related problem and I was hoping someone could help me out.

    I just upgraded to 2.0 and now when I receive my comment notificaiton email, instead of showing the commenter’s email address in the From: line, it shows the commentersname@localhost

    Any idea how to fix this? Any help is much appreciated!

    Hilary

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Which 1.5.2 file contains the comment notification function?’ is closed to new replies.