Skip to content

Instantly share code, notes, and snippets.

@atwellpub
Created October 14, 2015 17:56
Show Gist options
  • Save atwellpub/074e6dfebadd5095f787 to your computer and use it in GitHub Desktop.
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.
<?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