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

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

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. See the developer email validation documentation for more details.

What is an email bounce back?

A bounced email is an email that is returned to the sender by a receiving mailserver that refused or could not process the message. This typically occurs when sending emails to addresses that do not exist or are full. When a mailserver returns many emails to a sender the sender is considered a bad actor and their spam ranking is marked down. Therefore it is important to reduce the bounce rate when sending emails.

email mta bounce

What happens when a bounce is received

When sending emails with Mailslurp a Return-Path is used that servers can send a bounce back to. When they do MailSlurp records a bounce event against your account. There is a maximum daily bounce rate and a maximum total bounce count that limits your account. Exceeding these limits can result in temporary account freeze.

email spam reject

If your account is temporarily frozen due to exceeding maximum bounce count please contact support to re-enable your account or upgrade to a plan that allows email verification

Managing your bounces

Click the Bounces sidebar link to view your account bounces:

bounce-emails

Click on a bounce to view the bounce message and diagnose the cause of the rejection. Try to prevent sending to similar addresses or use the validation features to filter out bad email addresses when sending.

view dsn mta bounce

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 delivery rate. To avoid improve your email sending validate, verify, or check your email recipients before sending.

Bounce reputation and consequences

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

Verify email lists before sending

When sending marketing emails in MailSlurp use the sending validaiton options in the compose screen to verify email addresses during sending using the MailSlurp web app dashboard.

validate email address

You can also enable filtered of any previously bounced recipients with the check-button below:

clean email address list

Filtering bounced emails will ensure no emails are sent to any addreses that caused a bounce in your account in the past.

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. Verifying email addresses in Javascript is easy:

const mailslurp = new MailSlurp(config);
const res =
  await mailslurp.emailVerificationController.validateEmailAddressList({
    validateEmailAddressListOptions: {
      emailAddressList: ['contact@mailslurp.dev', 'bad@mailslurp.dev'],
    },
  });
expect(res.resultMapEmailAddressIsValid['contact@mailslurp.dev']).toEqual(
  true
);
expect(res.resultMapEmailAddressIsValid['bad@mailslurp.dev']).toEqual(
  false
);

You can also verify emails in the dashboard and view the results online.

check email address exists

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 in the dashboard.

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 avoid additional bounces is by creating an account webhook for BOUNCE and BOUNCE_RECIPIENT events. See the webhook documentation for event descriptions.

With webhooks your server is 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.

What does an SMTP bounce back look like?

A raw multipart MIME message delivered with SMTP can contain multiple parts with different Content-Type headers.

What is the response format?

Email messages are Mime Message format that is often multi-part. The parts of the SMTP message body are marked with Content-Type headers. RFC6522 describes the delivery of administrator messages. These admin content parts are used to transmit a delivery status notification or undelivered email when a bounce occurs. When the message is returned to the MailSlurp server a header such as below is sought:

Remote-MTA: dns; smtp.outlook [192.1.2.3]
Diagnostic-Code: smtp; 550 Inbox is full

Return message

Bounce emails returned to the sender normally contain a standard text/plain content part with a message about delivery.


------=_Part_7275455_89815520.1643706717635
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Description: Notification

An error occurred while trying to deliver the mail to the following recipients:
289xn3-sd83sh@gmail.com

Then after that will sometimes be a message/delivery-status content part with headers in the body that indicate the reporting mail transfer agent (Reporting MTA) and a diagnostic message for the final recipient.

message/delivery-status

RFC3464 describes the delivery status content part that is included by most mail transfer agents when a bounce is returned to the Return-Path:

------=_Part_7275455_89815520.1643706717635
Content-Type: message/delivery-status
Content-Transfer-Encoding: 7bit
Content-Description: Delivery Status Notification

Reporting-MTA: dns; a27-85.smtp-out.us-west-2.amazonses.com

Action: failed
Final-Recipient: rfc822; 289xn3-sd83sh@gmail.com
Diagnostic-Code: smtp; 550-5.1.1 The email account that you tried to reach does not exist. Please try
 550-5.1.1 double-checking the recipient's email address for typos or
 550-5.1.1 unnecessary spaces. Learn more at
 550 5.1.1  https://support.google.com/mail/?p=NoSuchUser d70si15497264pgc.182 - gsmtp
Status: 5.1.1

Undelivered message (message/rfc822)

The original undelivered message is included in the returned email.

------=_Part_7275455_89815520.1643706717635
Content-Type: message/rfc822
Content-Description: Undelivered Message

From: ed44f47c-9f2b-4506-97a4-0180ab1622ba@mailslurp.mx

Viewing bounces for your account

You can view and diagnose bounce alert in your account on the bounces page of the app.

Related content

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 Bounces: What to Do About Them?

Email Bounces: What to Do About Them?

Keeping your email marketing list clean - avoiding bounces and complaints

Keeping your email marketing list clean - avoiding bounces and complaints

Email address verification

Check email addresses are real and exist using MailSlurp email verification.

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

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

Reducing email bounces and maintaining account reputation using webhooks

Setup bounce notification webhooks for your account to reduce email bounces

Ready to dive in?Start building email applications today.