Forums

Upgraded to 1.5.2 ... very easily... but ! (4 posts)

  1. Ali-butt
    Member
    Posted 6 years ago #

    when someone posts a comment on my site, the email i get has no from address.

    I have searched in the forums for this but the solutions (remove more from @mail in functions.php) dont seem to be for wp 1.5.2.

    I am hosting at home on win2k3 and iis6 with php4.

    Just to reiterate, i am getting emailed when someone leaves a comment but there is no "FROM:" address.. ie its blank.

    Where does it pull the from address ? i thought it would use the normal admin address... buts its coming up blank.

    This all started happening when i upgraded to 1.5.2.

    Thanks in advance.
    Ali
    http://www.alibutt.com

  2. Mark Jaquith
    WordPress Lead Dev
    Posted 6 years ago #

    You can look in wp-includes/pluggable-functions.php to see how it is calling it. You could also consider WP 2.0.1 which uses wordpress@domain.com for From, I think, and uses Reply-To for the commenter's e-mail.

  3. Ali-butt
    Member
    Posted 6 years ago #

    Thanks for the reply.

    Im actually a php newbie, in fact a WP newbie too !

    I have looked in the pluggable-fuctions.php and found:

    if ( !function_exists('wp_mail') ) :
    function wp_mail($to, $subject, $message, $headers = '') {
    if( $headers == '' ) {
    $headers = "MIME-Version: 1.0\n" .
    "From: " . get_settings('admin_email') . "\n" .
    "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
    }

    return @mail($to, $subject, $message, $headers);
    ---------------

    i really didnt know what i was looking for or where i can specify a "from:" address.

    Could someone please clarify ?

    ps this was working perfectly in 1.5, its only after i upgraded to 1.5.2 that i lost the "From:" address.

    Thanks in advance.
    Ali
    http://www.alibutt.com

  4. Ali-butt
    Member
    Posted 6 years ago #

    Just an update,

    i have tried to change the line:
    "From: " . get_settings('admin_email') . "\n" .

    so it says

    "From:ali@alibutt.com " . get_settings('admin_email') . "\n" .

    but the emails are still coming back with no "From:" address :(

Topic Closed

This topic has been closed to new replies.

About this Topic