There are many npm packages that solves the following issue.
|--------| /--X--| SMTP 1 | / ^ |--------| / \--- Retry with next provider…
|--------| /--X--| SMTP 1 | / ^ |--------| / \--- Retry with next provider