Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bhubbard/590be8938b6084f0c59764c73fa72940 to your computer and use it in GitHub Desktop.
Save bhubbard/590be8938b6084f0c59764c73fa72940 to your computer and use it in GitHub Desktop.
PHP filter hooks to supply a custom from email address and name for MonsterInsights email summary reports.
<?php
/** MonsterInsights Email Hooks */
// Sender email address filter hook.
function my_custom_sender_email_address( $original_sender_email_address ) {
return 'YOURSENDEREMAILADDRESS';
}
add_filter( 'monsterinsights_email_from_address', 'my_custom_sender_email_address' );
// Sender name filter hook.
function my_custom_sender_name( $original_sender_name ) {
return 'YOURSENDERNAME';
}
add_filter( 'monsterinsights_email_from_name', 'my_custom_sender_name' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment