Created
October 14, 2015 17:56
-
-
Save atwellpub/074e6dfebadd5095f787 to your computer and use it in GitHub Desktop.
This gist will help programatically replace the from name and the from address on New Lead Notification emails.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //remove me | |
add_filter('inbound_email_response/headers' , 'modify_lead_notification_headers' , 10 , 1 ); | |
function modify_lead_notification_headers( $headers ) { | |
$old_from_email = '[email protected]'; | |
$new_from_email = '[email protected]'; | |
$old_from_name = 'The Site Name'; | |
$new_from_name = 'The New Name'; | |
$headers = str_replace( $old_from_email , $new_from_email ,$headers); | |
$headers = str_replace( $old_from_name , $new_from_name ,$headers); | |
return $headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment