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, you can set up a dedicated subdomain (such as chat.yourdomain.com
), or even 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.
By default all email notifications are sent from the address [email protected]
. Are you using a custom email domain? Then you can customize the local part of the sender address (the notifications
part before the @-symbol) directly from your TalkJS dashboard.
To customize your sender address:
- On your TalkJS dashboard, from the top right menu, select Email domains.
- From the list of domains, find the email domain for which you'd like to change the local part, and select Details.
- On the details page, in the section Sender addresses, update the email details and select Save sender addresses.
Your email notifications are now sent from the custom sender address you specified.
If the details page doesn't show the settings for the local part, then that likely means that your account doesn't have custom sender addresses enabled yet, and emails are still being sent from an address with a long, random-looking sender part.
Get in touch so that a member of the TalkJS team can enable custom sender addresses for your project.
- 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