fix_phpmailer_messageid

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

WordPress Version: 6.2

/**
 * Corrects From host on outgoing mail to match the site domain.
 *
 * @since MU (3.0.0)
 *
 * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_network()->domain;
}

WordPress Version: 6.1

/**
 * Corrects From host on outgoing mail to match the site domain
 *
 * @since MU (3.0.0)
 *
 * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_network()->domain;
}

WordPress Version: 4.9

/**
 * Correct From host on outgoing mail to match the site domain
 *
 * @since MU (3.0.0)
 *
 * @param PHPMailer $phpmailer The PHPMailer instance (passed by reference).
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_network()->domain;
}

WordPress Version: 4.7

/**
 * Correct From host on outgoing mail to match the site domain
 *
 * @since MU
 *
 * @param PHPMailer $phpmailer The PHPMailer instance, passed by reference.
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_network()->domain;
}

WordPress Version: 4.5

/**
 * Correct From host on outgoing mail to match the site domain
 *
 * @since MU
 *
 * @param PHPMailer $phpmailer The PHPMailer instance, passed by reference.
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_current_site()->domain;
}

WordPress Version: 3.8

/**
 * Correct From host on outgoing mail to match the site domain
 *
 * @since MU
 */
function fix_phpmailer_messageid($phpmailer)
{
    $phpmailer->Hostname = get_current_site()->domain;
}

WordPress Version: 3.7

/**
 * Correct From host on outgoing mail to match the site domain
 *
 * @since MU
 */
function fix_phpmailer_messageid($phpmailer)
{
    global $current_site;
    $phpmailer->Hostname = $current_site->domain;
}