Bounce email: verify address lists to reduce spam

Check email addresses exist before sending emails to reduce bounce-back returns and avoid spam bans.

Email bounce-backs cause harm to your sending reputation and increase the likelihood of being blocked by mailserver MTAs (mail transfer agents).

Track your bounce rate

Use the dashboard to track your email spam bounce rate and try to keep it low. spam ranking

Managing bounces

In the online email client you can see your current bounces and diagnose the cause. bounce-emails

Solutions to email bounces

The main way to reduce bounce reports is to prevent an email from being returned. To ensure a mailserver accepts your email make sure the email is properly formed:

Setup your domain correctly

When using custom email domains ensure you setup the correct spf and dkim records to tell mailservers you are authentic.

Verify email address lists before sending

Use email verification services to verify lists of emails before you send a marketing campain:

test email exists

You can see the results of validation in the verification result panel:

check email address

In code this looks like:

const verificationResult =
  await mailslurp.emailVerificationController.validateEmailAddressList({
    validateEmailAddressListOptions: {
      emailAddressList: [recipient],
    },
  });
// returns a map of `{ emailAddress: isValid }`
expect(
  verificationResult.resultMapEmailAddressIsValid[recipient]
).toBeTruthy();
// or lookup results in arrays
expect(verificationResult.invalidEmailAddresses.length).toEqual(0);
expect(verificationResult.validEmailAddresses.length).toEqual(1);

Verify emails when sending

When sending emails select the verification feature to filter out invalid email addresses to ensure to email bounces.

validate email address

To filter recipients during sending in code pass the validate options:

// the `validateEmailAddresses` option will verify then filter and remove bad recipients
// you can also configure the method to throw instead with `VALIDATE_ERROR_IF_INVALID`
await mailslurp.sendEmail(inboxId, {
  to: [recipient, bouncedRecipient],
  validateEmailAddresses:
    SendEmailOptionsValidateEmailAddressesEnum.VALIDATE_FILTER_REMOVE_INVALID,
});

Filter bounced recipients

When sending in code via API use the filterBouncedRecipients option to remove known bounced recipients.

// use the `filterBouncedRecipients` to filter
// out previously bounced recipients and avoid errors
await mailslurp.sendEmail(inboxId, {
  to: [recipient, bouncedRecipient],
  filterBouncedRecipients: true,
});
// will only email `recipient` and will skip a known bounced recipient