id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 53048,"PHPMailer uses hardcoded default sender mail address, preventing mail to be sent",vinc17,,"The retrieve_password() function of wp-login.php fails with the error message ""The email could not be sent. Your site may not be correctly configured to send emails."" when sending the mail because the default sender used by wp_mail() is blocked as non-existing (well, I assume that this is the cause, because I am not the admin of the local mail server). According to the wp_mail() code: {{{ /* * If we don't have an email from the input headers, default to wordpress@$sitename * Some hosts will block outgoing mail from this address if it doesn't exist, * but there's no easy alternative. Defaulting to admin_email might appear to be * another option, but some hosts may refuse to relay mail from an unknown domain. * See https://core.trac.wordpress.org/ticket/5007. */ if ( ! isset( $from_email ) ) { // Get the site domain and get rid of www. $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); if ( 'www.' === substr( $sitename, 0, 4 ) ) { $sitename = substr( $sitename, 4 ); } $from_email = 'wordpress@' . $sitename; } }}} so that the local part of the sender is hardcoded to ""wordpress"". Even though a wordpress e-mail address could be created at my site, sharing the same sender address among all the WordPress instances at the site may be a bad idea. So this should be configurable.",defect (bug),closed,normal,,Mail,2.2,normal,invalid,,,