Each time your account receives a bounce or complaint email it is recorded against your sender score. If your account reputation has too many bounces you could be suspended from sending. To avoid this it is important to keep bounces low and take action when bounces occur. See the email event webhook documentation for more information on setting up webhooks.

Getting notified of account bounces

You can see your bounces in the reputation bounce section of the MailSlurp dashboard. You can also receive notification of each bounce by creating an account webhook.

Javascript code example

Create account webhooks in code or using the dashboard. You can use the package to create dummy server endpoints if your server is not yet ready. Use the NPM package

Create a bounce webhook

To create a webhook use the webhookController in the main package.

You can then have MailSlurp send a test payload to your account using the sendTestData method.

Testing webhooks to receive bounce event

You can use the free to spin up a test server to receive webhooks if your server is not reachable.

Actions to take when bounces occur

If you receive a bounce or bounce_recipient webhook notification on your server you should save the recipient email address to a ban list and check the user on the ban list before sending emails again. This will mean you will only bounce once on a recipient.

Additional bounce methods

You can also avoid bounces by verifying that email addresses exist using the email verification methods available in the dashboard and API.

Here is an example of filtering out invalid email addresses during sending using the Java client:

Validate email address lists

To reduce bounces consider validating email address to filter out non-existing emails:

You can view validated email addresses in the online dashboard