Skip to content

Instantly share code, notes, and snippets.

@searchwpgists
Created September 23, 2025 12:52
Show Gist options
  • Select an option

  • Save searchwpgists/666c565d500476acad8d39e40c9e660a to your computer and use it in GitHub Desktop.

Select an option

Save searchwpgists/666c565d500476acad8d39e40c9e660a to your computer and use it in GitHub Desktop.
Change sender email for email summaries
<?php
// Change the sender of SearchWP email summaries.
add_filter( 'searchwp/emails_summaries/email_headers', function ( $headers, $args ) {
$old_email = $args['from_address'];
$new_email = 'sender_email@domain.com';
// Replace the admin email address with new email address.
return str_replace( $old_email, $new_email, $headers );
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment