update_option_new_admin_email

The timeline below displays how wordpress function update_option_new_admin_email has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * Sends a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if (get_option('admin_email') === $value || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_user_locale(get_current_user_id());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

Someone with administrator capabilities recently requested to have the
administration email address changed on this site:
###SITEURL###

To confirm this change, please click on the following link:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     *  - ###USERNAME###  The current user's username.
     *  - ###ADMIN_URL### The link to click on to confirm the email change.
     *  - ###EMAIL###     The proposed new site admin email address.
     *  - ###SITENAME###  The name of the site.
     *  - ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    if ('' !== get_option('blogname')) {
        $site_title = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    } else {
        $site_title = parse_url(home_url(), PHP_URL_HOST);
    }
    $subject = sprintf(
        /* translators: New admin email address notification email subject. %s: Site title. */
        __('[%s] New Admin Email Address'),
        $site_title
    );
    /**
     * Filters the subject of the email sent when a change of site admin email address is attempted.
     *
     * @since 6.5.0
     *
     * @param string $subject Subject of the email.
     */
    $subject = apply_filters('new_admin_email_subject', $subject);
    wp_mail($value, $subject, $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 6.2

/**
 * Sends a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if (get_option('admin_email') === $value || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_user_locale(get_current_user_id());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

Someone with administrator capabilities recently requested to have the
administration email address changed on this site:
###SITEURL###

To confirm this change, please click on the following link:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    if ('' !== get_option('blogname')) {
        $site_title = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    } else {
        $site_title = parse_url(home_url(), PHP_URL_HOST);
    }
    wp_mail($value, sprintf(
        /* translators: New admin email address notification email subject. %s: Site title. */
        __('[%s] New Admin Email Address'),
        $site_title
    ), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 6.1

/**
 * Sends a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if (get_option('admin_email') === $value || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

Someone with administrator capabilities recently requested to have the
administration email address changed on this site:
###SITEURL###

To confirm this change, please click on the following link:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    if ('' !== get_option('blogname')) {
        $site_title = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    } else {
        $site_title = parse_url(home_url(), PHP_URL_HOST);
    }
    wp_mail($value, sprintf(
        /* translators: New admin email address notification email subject. %s: Site title. */
        __('[%s] New Admin Email Address'),
        $site_title
    ), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 5.4

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if (get_option('admin_email') === $value || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(
        /* translators: New admin email address notification email subject. %s: Site title. */
        __('[%s] New Admin Email Address'),
        wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)
    ), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 5.3

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(
        /* translators: New admin email address notification email subject. %s: Site title. */
        __('[%s] New Admin Email Address'),
        wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)
    ), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 5.2

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    /* translators: New admin email address notification email subject. %s: Site title */
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 9.7

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 9.3

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: .20

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 9.2

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: .10

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . wp_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 4.9

/**
 * Send a confirmation request email when a change of site admin email address is attempted.
 *
 * The new site admin address will not become active until confirmed.
 *
 * @since 3.0.0
 * @since 4.9.0 This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
 *
 * @param string $old_value The old site admin email address.
 * @param string $value     The proposed new site admin email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the text of the email sent when a change of site admin email address is attempted.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The proposed new site admin email address.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU (3.0.0)
     * @since 4.9.0 This filter is no longer Multisite specific.
     *
     * @param string $email_text      Text in the email.
     * @param array  $new_admin_email {
     *     Data relating to the new site admin email address.
     *
     *     @type string $hash     The secure hash used in the confirmation link URL.
     *     @type string $newemail The proposed new site admin email address.
     * }
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_option('blogname'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 4.8

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', wp_specialchars_decode(get_site_option('site_name'), ENT_QUOTES), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'), ENT_QUOTES)), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 4.7

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $switched_locale = switch_to_locale(get_user_locale());
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
    if ($switched_locale) {
        restore_previous_locale();
    }
}

WordPress Version: 4.6

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filters the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 4.5

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(self_admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 4.3

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $current_user = wp_get_current_user();
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 4.2

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $email_text = __('Howdy ###USERNAME###,

You recently requested to have the administration email address on
your site changed.

If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###USERNAME###  The current user's username.
     * ###ADMIN_URL### The link to click on to confirm the email change.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $content = str_replace('###USERNAME###', $current_user->user_login, $content);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 4.1

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
 * @param string $old_value The old email address. Not currently used.
 * @param string $value     The new email address.
 */
function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $email_text = __('Dear user,

You recently requested to have the administration email address on
your site changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 4.0

function update_option_new_admin_email($old_value, $value)
{
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $email_text = __('Dear user,

You recently requested to have the administration email address on
your site changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 3.9

function update_option_new_admin_email($old_value, $value)
{
    $email = get_option('admin_email');
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $email_text = __('Dear user,

You recently requested to have the administration email address on
your site changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), wp_specialchars_decode(get_option('blogname'))), $content);
}

WordPress Version: 3.7

function update_option_new_admin_email($old_value, $value)
{
    $email = get_option('admin_email');
    if ($value == get_option('admin_email') || !is_email($value)) {
        return;
    }
    $hash = md5($value . time() . mt_rand());
    $new_admin_email = array('hash' => $hash, 'newemail' => $value);
    update_option('adminhash', $new_admin_email);
    $email_text = __('Dear user,

You recently requested to have the administration email address on
your site changed.
If this is correct, please click on the following link to change it:
###ADMIN_URL###

You can safely ignore and delete this email if you do not want to
take this action.

This email has been sent to ###EMAIL###

Regards,
All at ###SITENAME###
###SITEURL###');
    /**
     * Filter the email text sent when the site admin email is changed.
     *
     * The following strings have a special meaning and will get replaced dynamically:
     * ###ADMIN_URL### The link to click on to confirm the email change. Required otherwise this functunalty is will break.
     * ###EMAIL###     The new email.
     * ###SITENAME###  The name of the site.
     * ###SITEURL###   The URL to the site.
     *
     * @since MU
     *
     * @param string $email_text      Text in the email.
     * @param string $new_admin_email New admin email that the current administration email was changed to.
     */
    $content = apply_filters('new_admin_email_content', $email_text, $new_admin_email);
    $content = str_replace('###ADMIN_URL###', esc_url(admin_url('options.php?adminhash=' . $hash)), $content);
    $content = str_replace('###EMAIL###', $value, $content);
    $content = str_replace('###SITENAME###', get_site_option('site_name'), $content);
    $content = str_replace('###SITEURL###', network_home_url(), $content);
    wp_mail($value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content);
}