Skip to content
Docs

SMTP

A program that sends email over SMTP — WordPress, Laravel, Django, PHPMailer, Nodemailer — can send through us with no code change: our host, and an API key as the password.

The settings

SettingValue
Hostsmtp.mydomainshub.com
Port465, or 2465 where 465 is blocked
EncryptionSSL/TLS (TLS from the start). STARTTLS is not offered.
Usernamemydomainshub
PasswordAn API key (mdh_live_…). A sending key is enough.

Make the key under API keys in the dashboard. The From address must be at a domain verified on the account, as for the API. New accounts start in the sandbox, sending only to their own team until we have approved them.

In your framework

Our tests send with Nodemailer. The others are each framework’s usual SMTP settings with ours filled in.

WordPress: in a plugin such as WP Mail SMTP, choose “Other SMTP”, then enter the host, SSL encryption, port 465, authentication on, and the username and password above.

What is carried

  • Recipients are those your program names in RCPT TO, as SMTP always has. Those in the To and Cc headers keep their place and name; anyone else is Bcc. At least one must be in To, and at most 50 in all.
  • From, Reply-To, the subject, the HTML and text, and every attachment. An image the HTML shows with cid: stays inline.
  • Headers the API takes: X-* (not X-SES-*), List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References and Auto-Submitted, at most 20. Others your program adds, such as Message-ID and Date, are ours to write and are left out.
  • Sent twice by mistake? The same Message-ID to the same recipients within 24 hours is queued once — so a program that retries after a lost answer does not send it twice.

Tags and scheduling are API-only: SMTP has no place for them. See the API reference.

Limits

  • 7 MB a message, attachments included, and 100 emails a connection.
  • Your plan’s caps, the sandbox and your suppression list apply as they do to the API, and each email counts against the key’s rate limit as one request does. See the limits.

The replies

A 4xx reply means try again later; a 5xx means something must change first. The text says which rule refused it, in the words the API uses.

ReplyWhat it means
250 2.0.0 Queued as …Queued. The id is the email’s: find it in Emails, or read it with GET /emails/{id}.
535 5.7.8The password is not a live API key of this account.
454 4.7.0We could not check the key just now: try again in a minute.
451 4.x.xTry again later: a busy key, today’s cap (it opens at midnight, Lagos time), or a moment of trouble on our side. A program with a queue sends again by itself.
452 4.5.3More than 50 recipients: send the rest as another email.
550 5.7.1Not allowed: the From domain is not verified, the account is in the sandbox or paused, this month’s cap is reached, or the content checks refused it. The text says which.
550 5.6.0The message itself: no From, no To, or a field the API would refuse.
552 5.3.4Larger than 7 MB.