Email verification: checking a list of email addresses to reduce bounces

Avoid bounces and deliver emails to your customers with email verification and validation.

verify emails

Sending emails is a common requirement for many modern applications and enterprises. Use MailSlurp's free email API to validate email addresses in code or using an online dashboard.

Why it is important to check email lists before sending

If you are writing an email application in Csharp, Javascript, Ruby, Python or any other language you probably want to check email addresses before sending emails. This reduces the risk of sending an email to an address that does not exist. Emailing non-existing email addresses can result in bounce warnings or SMTP complaints. Complaints and bounces affect your sending reputation and email deliverability rate. To avoid improve your email sending validate, verify, or check your email recipients before sending.

How to verify a list of emails

When you want to check a list of email addresses to see if they exist use the EmailVerificationControllerAPI client in a language of your choice. Here is an example in Java:

public void canVerifyEmailAddresses() throws ApiException {
    EmailVerificationControllerApi verificationControllerApi = new EmailVerificationControllerApi(apiClient);
    ValidateEmailAddressListResult validateEmailAddressListResult = verificationControllerApi.validateEmailAddressList(new ValidateEmailAddressListOptions().addEmailAddressListItem("contact@mailslurp.dev"));
    assertEquals(true, validateEmailAddressListResult.getResultMapEmailAddressIsValid().get("contact@mailslurp.dev"));
}

Checking email addresses when sending

Combine MailSlurp's powerful email checking algorithms and live SMTP mailserver checks to filter invalid recipients from your emails when sending. See the following email sending example in Java:

// send an email from inbox1 to inbox2 and wait for confirmation
SendEmailOptions sendOptions = new SendEmailOptions()
        .validateEmailAddresses(SendEmailOptions.ValidateEmailAddressesEnum.VALIDATE_FILTER_REMOVE_INVALID)
        .addToItem(inbox2.getEmailAddress())
        .addToItem(notExistingEmailAddress)
        .subject("Hello inbox 2")
        .body("Send me a reply");
SentEmailDto confirmation = inboxController.sendEmailAndConfirm(inbox1.getId(), sendOptions);
assertEquals(confirmation.getTo(), Collections.singletonList(inbox2.getEmailAddress()));
assertEquals(confirmation.getReplyTo(), inbox1.getEmailAddress());

Verifying email addresses online

MailSlurp offers a powerful online dashboard for validating email address and contact lists in bulk. Simple sign up and navigate to the verification section. Enter your addresses separated by a new line and click verify to check each address against remote mail servers to see if they exist and accept mail.

Receive bounce notifications using webhooks

The best way to a avoid additional bounces is by creating an account webhook for BOUNCE and BOUNCE_RECIPIENT events. This way your server will be sent a payload each time a bounce occurs containing the email addresses of bounce recipients. You can save these bounced email addresses to a ban list and avoid sending to them in the future. See the account webhook guide for more information.

Bounce reputation and consequences

Too many bounces or complaints from emails sent from your account can leqad to sending ability being suspended. If this happens please contact support.

Ready to dive in?Start building email applications today.