Copy All Gravity Forms Notifications to an Archive Address
Adds a blind copy of every Gravity Forms notification to an archive or CRM inbox, so you keep a record of all submissions even if entries are deleted.
Opens WPIDE on
Code
$wpide_gf_archive_email = '[email protected]';
add_filter( 'gform_notification', function ( $notification ) use ( $wpide_gf_archive_email ) {
if ( ! is_email( $wpide_gf_archive_email ) ) {
return $notification;
}
$bcc = trim( (string) rgar( $notification, 'bcc' ) );
$notification['bcc'] = $bcc ? $bcc . ',' . $wpide_gf_archive_email : $wpide_gf_archive_email;
return $notification;
} );
Notes
Existing BCC addresses on a notification are kept; set the archive address at the top.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.