Skip to content

Instantly share code, notes, and snippets.

@vishalbasnet23
Created March 16, 2015 08:29
Show Gist options
  • Select an option

  • Save vishalbasnet23/8be2a7790f2097cc0ee9 to your computer and use it in GitHub Desktop.

Select an option

Save vishalbasnet23/8be2a7790f2097cc0ee9 to your computer and use it in GitHub Desktop.
Change Return Path of wp_mail()
<?php
/**
* Return Path Change
*/
class email_return_path {
function __construct() {
add_action( 'phpmailer_init', array( $this, 'fix' ) );
}
function fix( $phpmailer ) {
$phpmailer->Sender = $phpmailer->From;
}
}
new email_return_path();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment