WordPress Chat Email Notifications: Templates & Smart Delivery
Email notifications are the bridge between members who live in their inbox and a messenger they only open occasionally. Done badly, they spam — every message triggers a separate email and the recipient mutes the whole thing within a week. Done well, they batch intelligently, respect the user's online state, and look like part of your site's brand. Better Messages handles email notifications with smart grouping (one email per thread per batch window), online-state awareness (no email until the recipient has been away a while), and customizable templates (Simple visual mode, Custom HTML mode, or BuddyPress template integration).
Smart delivery (the part most chat plugins get wrong)#
Better Messages does not email per-message. Instead:
- Messages are grouped by thread and delivered in batches by cron. How often that cron runs is the Notification Interval setting — minutes, 15 by default,
0to switch email notifications off entirely. - Users do not get an email until they have been offline for the Offline Delay — also 15 minutes by default,
0to always send. Someone reading the thread live never gets the mail. - Users do not get an email for messages already marked as read.
- Users do not get an email if they have disabled email notifications in their own settings.
Both numbers live at Settings → Notifications → Email Notifications, so a site that wants faster mail can drop them without touching code. The default behaviour matches what consumer messengers do: batch chatty threads, skip if the recipient is already active. Members do not get spammed. They do not miss messages either.
Three template modes#
Simple Mode (no code)#
For sites that want a clean branded email without writing HTML, Simple Mode exposes visual controls:
- Email Logo — upload an image displayed at the top of every email
- Primary Color — buttons and links
- Background Color — outer email background
- Content Background Color — main content area background
- Text Color — body text
- Header Text — custom greeting with
{{user_name}}placeholder - Footer Text — custom footer with
{{site_name}}and{{site_url}}placeholders - Button Text — label for the "View Conversation" button
A live preview shows the email as you change settings.
Custom HTML Mode (full control)#
For sites that want pixel-precise control or to match an existing email design system, paste a custom HTML template. Available placeholders:
| Placeholder | What it renders |
|---|---|
{{site_name}} | Your website name |
{{site_url}} | Your website URL |
{{user_name}} | Recipient's display name |
{{subject}} | Conversation subject |
{{messages_html}} | The formatted batch of messages from this thread |
{{thread_url}} | Link to the conversation |
{{email_subject}} | Email subject line |
{{unsubscribe_url}} | Unsubscribe link |
The settings screen lists the full set — alongside those eight there are {{unsubscribe_html}}, {{button_text}}, {{header_text}}, {{footer_text}}, {{logo_html}}, and the four colour tokens {{primary_color}}, {{background_color}}, {{content_bg_color}}, {{text_color}}, so a custom template can still inherit the Simple-mode palette.
Click Load Default Template to start from a working template and edit from there, and Preview Template to render it with sample content without sending anything.
BuddyPress Email Template (BuddyPress sites only)#
If BuddyPress is active, the default template source is BuddyPress Email Template — Better Messages uses your existing BuddyPress email customizations (templates, branding, footer copy) for chat notifications. Members see one consistent email look across BuddyPress activity and chat notifications.
Switch to Simple or Custom HTML mode if you want chat emails to differ from your BuddyPress brand. In BuddyPress mode there is also Auto-Create Email Template, which recreates the BuddyPress email post if it goes missing — turn it off once you have customised that template, so it is never overwritten.
Unsubscribe link#
Unsubscribe Link is its own toggle, not a template detail: turn it on and message notification emails carry an unsubscribe link, in every template mode. Clicking it stops future chat email notifications for that user. In a custom template you place it yourself with {{unsubscribe_url}} (or {{unsubscribe_html}} for the ready-made markup). In Simple mode it is added for you.
Test email#
Use the Send Test Email button in settings to preview what your template looks like in a real inbox. Enter an email address, save settings first, then send — the email lands in seconds.
How to enable / customize#
- WP Admin → Better Messages → Settings → Notifications → Email Notifications.
- Set Notification Interval and Offline Delay (both default to 15 minutes — interval
0turns email notifications off). - (BuddyPress sites) Pick Template Source: BuddyPress Email Template or Custom Template.
- (Custom Template) Pick Template Mode: Simple or Custom HTML.
- Configure colors / logo / text (Simple) or paste your HTML (Custom).
- Save and send a test email to verify.
Per-user preferences#
Members can toggle email notifications for themselves in their profile settings. Site-level email-on / off is the default. The per-user toggle lets opinionated members opt out without affecting anyone else.
Free vs WebSocket version#
Email notifications work identically on both versions:
| Feature | Free version | WebSocket version |
|---|---|---|
| Smart grouping by thread (Notification Interval, 15 min default) | yes | yes |
| Online-state awareness (Offline Delay, 15 min default) | yes | yes |
| Simple visual template mode | yes | yes |
| Custom HTML template mode | yes | yes |
| BuddyPress email template integration | yes | yes |
| Unsubscribe link | yes | yes |
| Per-user email-notification preferences | yes | yes |
Frequently asked questions#
Why are emails delayed by up to 15 minutes?#
The delay is intentional — it lets chatty threads batch into a single email instead of flooding the recipient. A 15-minute back-to-back conversation generates one email summarizing all messages in the thread rather than five separate emails.
Can I change the 15-minute window?#
Yes, and it is a setting rather than a filter — Notification Interval on the Notifications tab, in minutes. Smaller windows generate more emails. Larger windows risk dropping urgent threads off the timely feed. 15 minutes is the sweet spot for most sites. Offline Delay next to it is the separate question of how long someone must have been away before an email is worth sending at all.
Will members receive an email for their own messages?#
No — senders never get an email for their own messages. Only recipients of messages do.
What happens when a thread has many participants?#
Each recipient who is offline (and has email notifications on) gets the batched email. Online recipients see the message in the messenger directly.
Does this work with the WordPress mail config (wp_mail / SMTP plugins)?#
Yes — emails are sent through wp_mail(), so any SMTP plugin (WP Mail SMTP, Post SMTP, FluentSMTP) handles delivery. Configure your SMTP plugin once, all WordPress emails route through it including chat notifications.
Can I send a different template to different roles?#
The template is global. For per-role variations, use the bp_better_messages_overwrite_email filter — it lets you return entirely custom email HTML based on the recipient, so you can branch on wp_get_current_user()->roles and build a role-specific template.
See also#
- Email notifications feature documentation — full setup reference
- Site notifications documentation — on-site notification surface that complements email
- Privacy & GDPR documentation — privacy footprint of email notifications