Last active
September 11, 2017 05:24
-
-
Save leepettijohn/5eeb1918db6c35edab0f12a62b055c6c to your computer and use it in GitHub Desktop.
Gravity Forms - Add names to BCC field
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
<? | |
//source: https://www.gravityhelp.com/documentation/article/gform_pre_send_email/#4-copy-to-to-bcc | |
add_filter( 'gform_pre_send_email', function ( $email, $message_format, $notification ) { | |
if ( $notification['name'] != 'User Email' ) { | |
return $email; | |
} | |
$email['headers']['Bcc'] = 'Bcc: ' . $email['to']; | |
$email['to'] = 'name@somedomain.com'; | |
return $email; | |
}, 10, 3 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment