Skip to main content
mailers.io

Routing and failover

Per-send retries and hard provider errors, explained

By mailers.io team Published 5 min read

When you send thousands of messages, some sends will fail. A provider has a bad minute, a mailbox is full, a receiving server says no. What matters is what the sender does next. A system that retries everything blindly damages your reputation, and one that gives up too early loses mail. This post explains how mailers.io decides.

Step one: sort the error

Every failed send is classified before anything else happens. The class decides what follows.

  • Server fault. The problem is with the server or the account: the connection is refused, the login is rejected, the provider says the account is paused, a permission is missing, or the provider is rate limiting you. The message may move to another server.
  • Recipient fault. The address does not exist, the mailbox is full or the receiving server refuses it. This is final for that message.
  • Content fault. The message itself is refused, for example it is too large or looks like spam to the provider. Another server would say the same.
  • App fault. A problem on our side, such as a message that could not be built.
  • Unknown fault. A reply that cannot be classified. It does not move to another server.

The same classes apply to SMTP replies and to API errors. For API providers the app translates the provider’s answer into the equivalent. A paused account, a missing permission and a rate limit all count as server faults.

Step two: act on the class

A server fault

The message goes to the next eligible server in the same pass, never the same server twice for one message. The default rule allows three attempts. Each failed attempt is written to the message log with the server and the reason.

If it is a rate limit or a daily quota, the server is also put to sleep so that the next messages do not walk into the same wall. It sleeps for the time the provider asks for. When the provider names no time, the default is one minute, and a daily quota lasts until the next UTC midnight. While a server sleeps the others carry the load.

If every attempt fails, or no other server is available, the message is deferred and retried later.

A recipient fault

The message is not sent elsewhere. A rejection from the receiving server is final, and it counts as a send. What happens next depends on the kind of rejection:

  • A hard bounce, such as an address that does not exist, suppresses the address. Later sends to it are skipped and are not charged.
  • A complaint, reported by a provider or a mailbox, also suppresses it.
  • A soft bounce, such as a full mailbox, is recorded. After repeated soft bounces inside the soft-bounce window the address is suppressed too. The window defaults to 30 days and can be set from 7 to 90.

Do not try to fix a bounce by switching provider. A wrong address is wrong everywhere, and each try costs reputation. Verifying a list before the first step removes most of them early.

Content and unknown faults

They end the attempt at once. The log keeps the code and the text so that you can see what the provider objected to.

Waiting and retrying

Some failures are not final, such as a deferred answer from the receiving server or a server that is full or asleep. These messages are kept and tried again later. The pause grows with every try: the first wait is about a minute, and it grows to a maximum of an hour. Two other things shorten the wait:

  • When you add or enable a server, mail that had nowhere to go is woken at once.
  • When you disable, pause or delete a server, the mail waiting on it moves on to the others at once.

There is a limit. A message that cannot be sent within five days expires. It is marked expired and reported. If its last answer was a temporary refusal, the app records one soft bounce for it, not one per try. This stops a permanently broken source from sitting in the queue forever.

Mail can also wait for reasons that are not errors. The log names them: no server is eligible, every server is at a limit, a warm-up cap is reached, or credits have run out. Credits are checked before a server is chosen, and a message that waits for credits goes on when a pack or the next period arrives. See daily limits per mailbox and server for the limits.

When a server keeps failing

Every server fault is counted on the server. When it reaches five in a row, mailers.io raises a notice that the server is failing. It is raised once per problem, not on every message after that. A single successful send clears the count and the notice.

A Gmail or Microsoft 365 mailbox has a special case. If a call is refused after one forced refresh of its sign-in token, the grant is treated as revoked, the server is disabled and the notice is raised. The fix is to reconnect the mailbox.

Only server faults are counted. Bounces from your list never mark a server as failing, which is why a bad list shows up as a bounce rate and not as a broken server.

At least once, not exactly once

One limit is worth knowing. Delivery in mailers.io is at least once. If the app stops in the narrow moment after a provider has accepted a message and before the app has recorded it, the message is sent again on the next claim. The window is bounded, but it exists, and it is the usual trade-off in any queue that does not depend on a provider’s own duplicate protection. It is rare, and it is better than losing the message.

For mail you send through the API, you can protect your own retries with an idempotency key, as described in sending and tracking from code.

How to read this in practice

  1. A bounce is a list problem. Look at the address, not the server.
  2. A string of server faults is an account problem. Open the server, read the reason, and fix the credential, the limit or the account status.
  3. Many deferred messages are a capacity problem. Check the limits and the credits.
  4. Do not edit a rule to retry a bounce. Three attempts across servers is the right default for server trouble.

The next post, reading provider health and send logs, shows where each of these appears.

Questions and answers

Will a hard bounce be tried on another server?

No. A refused recipient is final. It is not retried elsewhere, and the address goes on your suppression list.

How long does mailers.io keep trying a message?

Up to five days. After that the message expires and is reported.

Can a message be sent twice?

In rare cases. Delivery is at least once: if the app stops after a provider accepts a message and before it records it, the message can be sent again.

Written by the mailers.io team. Published .

Keep reading

Related posts

Send cold e-mail from your own servers.

Connect your servers, import a list and write the steps. Replies stop the sequence.

  • 7-day money-back guarantee
  • Bring your own providers
  • Cancel anytime