Email notifications do not arrive
Better Messages emails a member about messages they have not read. It does not send an email for every message at once, so first make sure an email was due at all, then check what sends it.
1. Was an email due?#
Emails go out in batches, and only to members who are away. With the defaults, an email can come up to half an hour after the message. Both timings are under Settings → Notifications → Email Notifications:
- Email Notifications is the interval between batches, in minutes. The default is 15, and 0 turns emails off.
- Offline Delay emails a member only once they have been offline this many minutes. The default is 15, and 0 always sends.
No email is sent when:
- the member read the message before the batch went out
- the member was online within the offline delay
- the member turned emails off, or chose Only one-to-one conversations, mentions and replies, in their own messenger settings
- the notification level of the conversation is Mentions and replies or Nothing for that member
- the member used the unsubscribe link of an earlier email
To test, write to a member who is logged out, and wait for the interval and the offline delay to pass. A member who has the site open in any browser counts as online and gets no email.
2. Does the site send email at all?#
Press Send Test Email at the bottom of Settings → Notifications.
- The test does not arrive. The problem is the mail setup of the site, not Better Messages. Look in the spam folder first. Most hosts send email unreliably without an SMTP plugin: set one up with the mail service of your domain, and check with its own test that WordPress can send. The password reset email of WordPress is another quick test.
- The test arrives, and notifications do not. Go on to the next check.
3. Does WP-Cron run?#
The batches are sent by WP-Cron. Open Settings → Tools → WP Cron Jobs. If the page says WP Cron is not working properly on this site, or the next run of the job is in the past, emails wait until it runs.
WP-Cron runs only when someone visits the site, and not at all when DISABLE_WP_CRON is set without a cron job on the server. The fix is a real cron job, see WP Cron Jobs.
4. Chat rooms#
A chat room has its own notification settings: edit the room under Better Messages → Chat Rooms and look at Notifications.
- A room with Hide chat from conversation list turned on never notifies anyone, and its Notifications section is greyed out for that reason.
- Each member can also choose a notification level for the room.
5. Group conversations and mentions#
Since Better Messages 3.1, group conversations have notification levels in place of a single mute switch. A member on Mentions and replies is emailed only when mentioned or replied to. Settings → Notifications → Force Notifications for Mentions and Replies notifies a mentioned member even when they chose Nothing.
6. Guests#
A guest gets email notifications only after they gave an email address and confirmed it with the link sent to it. Turn on Settings → Guests → Email Address to ask guests for one.
Emails arrive, and look wrong#
- The template. On a BuddyPress or BuddyBoss site, Template Source chooses between the BuddyPress email template and the template of Better Messages. See Email notifications.
- The text of messages should not be in the email. Set Email Content to Senders only or Notice only.
- A fully custom email. See Replace the default email notifications.
- Members answer the email. A reply to a notification email does not reach the conversation. The button in the email opens it.