diff -ur wordpress.461/wp-includes/ms-functions.php wordpress/wp-includes/ms-functions.php
--- wordpress.461/wp-includes/ms-functions.php	2016-08-04 22:56:42.000000000 -0500
+++ wordpress/wp-includes/ms-functions.php	2016-10-10 14:05:45.828803300 -0500
@@ -797,7 +797,7 @@
 	$activate_url = esc_url($activate_url);
 	$admin_email = get_site_option( 'admin_email' );
 	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
+		$admin_email = 'support@' . get_current_domain();
 	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
 	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
 	$message = sprintf(
@@ -890,7 +890,7 @@
 	// Send email with activation link.
 	$admin_email = get_site_option( 'admin_email' );
 	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
+		$admin_email = 'support@' . get_current_domain();
 	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
 	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
 	$message = sprintf(
@@ -1492,7 +1492,7 @@
 	$admin_email = get_site_option( 'admin_email' );
 
 	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
+		$admin_email = 'support@' . get_current_domain();
 
 	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
 	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
@@ -1570,7 +1570,7 @@
 	$admin_email = get_site_option( 'admin_email' );
 
 	if ( $admin_email == '' )
-		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];
+		$admin_email = 'support@' . get_current_domain();
 
 	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );
 	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
diff -ur wordpress.461/wp-includes/pluggable.php wordpress/wp-includes/pluggable.php
--- wordpress.461/wp-includes/pluggable.php	2016-08-20 02:21:32.000000000 -0500
+++ wordpress/wp-includes/pluggable.php	2016-10-10 15:09:15.518141800 -0500
@@ -322,13 +322,7 @@
 	 */
 
 	if ( !isset( $from_email ) ) {
-		// Get the site domain and get rid of www.
-		$sitename = strtolower( $_SERVER['SERVER_NAME'] );
-		if ( substr( $sitename, 0, 4 ) == 'www.' ) {
-			$sitename = substr( $sitename, 4 );
-		}
-
-		$from_email = 'wordpress@' . $sitename;
+		$from_email = 'wordpress@' . get_current_domain();
 	}
 
 	/**
@@ -1466,7 +1460,7 @@
 		$notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
 	}
 
-	$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
+	$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower( get_current_domain() ));
 
 	if ( '' == $comment->comment_author ) {
 		$from = "From: \"$blogname\" <$wp_email>";
@@ -2452,3 +2446,17 @@
 }
 endif;
 
+if ( !function_exists( 'get_current_domain' ) ) :
+/**
+ * Retrieve the domain name for the current site, with leading www. stripped.
+ * Intended for use in sending emails.
+ *
+ * @since 4.7.0
+ * 
+ * @return string Domain name for the current site
+ */
+function get_current_domain () {
+	$dom = parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST );
+	return preg_replace('#^www\.#', '', strtolower( $dom ));
+}
+endif;
