Index: trunk/wp-mail.php =================================================================== --- trunk/wp-mail.php (revision 19712) +++ trunk/wp-mail.php (revision 20682) @@ -106,5 +106,5 @@ // Set the author using the email address (From or Reply-To, the last used) // otherwise use the site admin - if ( preg_match('/(From|Reply-To): /', $line) ) { + if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) { if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) ) $author = $matches[0]; @@ -115,12 +115,8 @@ echo '
' . sprintf(__('Author is %s'), $author) . '
'; $userdata = get_user_by('email', $author); - if ( empty($userdata) ) { - $author_found = false; - } else { + if ( ! empty( $userdata ) ) { $post_author = $userdata->ID; $author_found = true; } - } else { - $author_found = false; } }