Email notifications
When a user has been offline for a while, they can receive email notifications for messages that they missed. You can modify the email notification that TalkJS sends directly from the Notifications page on your dashboard, in the 'Email settings' section.
Example notification email
To avoid spamming the user's inbox, TalkJS groups messages in an email notification and sends the notification only after a period of user inactivity. You can specify the period of inactivity after which TalkJS should send a notification in your dashboard:
To enable email notifications for a user, make sure that the user has at least one email address on record. Any user with an email address automatically starts receiving email notifications as soon as they have been offline for a while. Users can have more than one email address, and TalkJS notifies all email addresses on record.
To turn off email notifications for a user, you can remove their email on record by setting the user's email field to null
. You can also mute notifications for a particular conversation with the REST API. With notifications muted, your user won't receive any notifications for that conversation, including email notifications.
TalkJS also supports reply by email, which allows users to continue a conversation when they have their chat closed. When a user receives a notification email about messages they missed, they can reply directly to that email, and their reply automatically shows up in the conversation.
In the email notification, you can also link back to your app so that the user can easily rejoin the conversation.
Users who only have Read
access to a conversation can receive email notifications, but replies they send to a notification email won't show up in the conversation.
If you would like to have different email notifications for different users, create a separate role for each user group and adjust the email notification settings per role.
Here is a step-by-step tutorial on how to show different email notifications for different users.
All email notifications include a link that unsubscribes the user. This is required to ensure that your emails are delivered reliably, as it is included in Google's requirements for large email senders.
See Unsubscribe link customization for more details.
To ensure that email notifications work smoothly, we recommend setting up a dedicated subdomain (such as chat.yourdomain.com
), or even on a fully new domain (such as yourdomainchat.com
), for email notification purposes. This practice helps you avoid any potential issues that could arise from having multiple mail servers on the same domain, in case you already use your main domain for email.
- Webhooks provide several events related to email notifications, including:
notification.triggered
,notification.sent
,notification.delivered
,notification.bounced
,notification.opened
, andnotification.link.clicked
. - You can turn notifications on or off via the REST API, with operations on participants.
- Customize notification content