Support » Plugin: Easy WP SMTP » Use phpmailer_init to alter XMailer

  • Resolved Barton

    (@thebarton)


    It doesn’t seem to let me alter the XMailer part of phpmailer when using this plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    It doesn’t seem to let me alter the XMailer part of phpmailer when using this plugin.

    Can you provide more information. I want to make sure I understand your question correctly.

    Thank you.

    Thread Starter Barton

    (@thebarton)

    Here’s the WordPress ticket, wondering if there’s another hook I’m supposed to use to remove the XMailer header when this plugin is enabled.

    https://core.trac.wordpress.org/ticket/19549#comment:24

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    Thank you for providing more information. I have submitted a message to the developers to investigate further your request.

    Kind regards.

    Plugin Author wp.insider

    (@wpinsider-1)

    This code works just fine:

    
    add_action( 'phpmailer_init', 'disable_xmailer' ); function disable_xmailer( $phpmailer ) { $phpmailer->XMailer = ' '; }
    

    There is nothing needs to be added to the plugin in order for this to work.

    It doesn’t work for test email the plugin sends, this is because it is using direct access to the phpMailer class. This is intentional, to prevent other plugins from interfering with the test email.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use phpmailer_init to alter XMailer’ is closed to new replies.