Stop Gmail Grouping Your Site's Emails Into Threads
Adds a unique reference header to every email so Gmail shows each notification separately instead of bundling emails with the same subject into one long conversation.
Opens WPIDE on
Code
add_action( 'phpmailer_init', function ( $phpmailer ) {
$phpmailer->addCustomHeader( 'X-Entity-Ref-ID', wp_generate_uuid4() );
} );
Notes
Invisible to recipients; Gmail uses the X-Entity-Ref-ID header to decide whether to thread messages.
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.