Email notifications
How email notifications work?#
Instead of a separate email for every new message, Better Messages groups messages by conversation and sends one email per batch from a cron job. Both timings live at WP Admin → Better Messages → Settings → Notifications → Email Notifications:
- Notification Interval — how often the batch goes out, in minutes. Default 15.
0disables email notifications entirely. - Offline Delay — only email a user once they have been offline this many minutes. Default 15.
0always sends.
A user is skipped when:
- they have turned email notifications off in their own settings
- they have already read the message
- they were online within the Offline Delay window
Email Template Customization#
Better Messages allows you to customize the appearance of email notifications sent to users.
Template Source (BuddyPress sites only)#
If you have BuddyPress installed, you can choose between two template sources:
- BuddyPress Email Template - Uses your existing BuddyPress email customizations. This is the default option for BuddyPress sites.
- Custom Template - Use the simple or custom HTML template options described below.
Auto-Create Email Template sits beside the source picker: with it on, the BuddyPress email template is recreated if it is missing. Turn it off if you have customized that template and do not want it overwritten.
Template Mode#
When using custom templates (or on non-BuddyPress sites), you can choose between two modes:
Simple Mode#
Simple mode allows you to customize the email appearance without writing any code:
- Email Logo - Upload a logo image to display at the top of emails. The logo will be displayed at its uploaded size, scaled down only if it exceeds the email width.
- Primary Color - Used for buttons and links.
- Background Color - Email outer background color.
- Content Background Color - Main content area background color.
- Text Color - Color of the email text.
- Header Text - Custom greeting text. Use
{{user_name}}placeholder for the recipient's name. Leave empty for default "Hi{{user_name}},". - Footer Text - Custom footer text. Use
{{site_name}}and{{site_url}}placeholders. - Button Text - Text for the "View Conversation" button.
Custom HTML Mode#
For full control over email appearance, you can create a custom HTML template. Available placeholders:
| Placeholder | Description |
|---|---|
{{site_name}} | Your website name |
{{site_url}} | Your website URL |
{{user_name}} | Recipient's display name |
{{subject}} | Conversation subject |
{{messages_html}} | Formatted messages content |
{{thread_url}} | Link to the conversation |
{{email_subject}} | Email subject line |
{{unsubscribe_url}} | Unsubscribe link URL |
Click "Load Default Template" to start with the default template structure and customize it.
Unsubscribe Link#
You can optionally add an unsubscribe link to message notification emails. When enabled, users can click the link to stop receiving message email notifications.
This setting is only available when using custom templates (not BuddyPress email templates, which have their own unsubscribe mechanism).
Test Email#
Use the "Send Test Email" feature to preview how your email template looks. Enter an email address and click "Send Test Email" to receive a sample notification.
Save your settings before sending a test email to ensure all changes are applied.
Frequently asked questions#
Why batch emails instead of sending immediately?#
A user in an active conversation might receive 20+ messages in a few minutes. Sending one email per message would flood inboxes. Batching groups all new messages per thread into a single email per Notification Interval — 15 minutes by default, and adjustable on the Notifications tab.
Are emails skipped when the user is active on the site?#
Yes — three conditions skip the email: the user disabled emails in their settings, they already read the message, or they were online within the Offline Delay window on Settings → Notifications, 15 minutes by default. The assumption is that an active user doesn't need an email summary.
Can I customize the email template per role?#
Not from the admin UI — the email template is a single site-wide setting. For per-role variations, override the outgoing email via the standard WordPress wp_mail filter and rewrite the body based on the recipient.
Does the unsubscribe link unsubscribe from all chat emails or just one type?#
It unsubscribes from message email notifications globally for that user. They continue to receive other Better Messages emails (account-related, password reset, etc.).
How does this work with the WebSocket version's instant delivery?#
Independently. Even on the WebSocket version, users get email notifications when they're not online. Instant delivery (web push, in-app) handles online users. Email handles offline.
See also#
- Sound notifications — audio alerts for online users
- Site notifications — on-site popups for online users
- Web push notifications — browser push when away (WebSocket version)
- Mass messaging — broadcast emails for admin announcements
- Email notifications blog post — feature overview