Ticket #1532: email_from_wordpress_at_domain.diff
| File email_from_wordpress_at_domain.diff, 1.6 KB (added by , 21 years ago) |
|---|
-
wp-includes/pluggable-functions.php
132 132 function wp_mail($to, $subject, $message, $headers = '') { 133 133 if( $headers == '' ) { 134 134 $headers = "MIME-Version: 1.0\n" . 135 "From: " . get_settings('admin_email') . "\n" .135 "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n" . 136 136 "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n"; 137 137 } 138 138 … … 286 286 $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n"; 287 287 $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n"; 288 288 289 $ admin_email = get_settings('admin_email');289 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); 290 290 291 291 if ( '' == $comment->comment_author ) { 292 $from = "From: \"$blogname\" <$ admin_email>";292 $from = "From: \"$blogname\" <$wp_email>"; 293 293 if ( '' != $comment->comment_author_email ) 294 294 $reply_to = "Reply-To: $comment->comment_author_email"; 295 295 } else { 296 $from = "From: \"$comment->comment_author\" <$ admin_email>";296 $from = "From: \"$comment->comment_author\" <$wp_email>"; 297 297 if ( '' != $comment->comment_author_email ) 298 298 $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>"; 299 299 }