Read our privacy policy
Skip to content

Guide · Sending

How to send email through the MepMail SMTP relay

Some systems only know how to send email through an SMTP form. The relay takes those messages, checks the domain and the suppressions, and queues them exactly like the API.

When the relay is the right door

WordPress and WooCommerce with an SMTP plugin, Ghost, Strapi, Supabase Auth, an ERP, a legacy stack: anything that asks for a host, a port, a user and a password instead of an HTTP call.

The relay puts the message through the same accept pipeline as POST /emails: the same domain verification, suppression checks, logs and delivery events.

The five values

Host: smtp.mepmail.dev.

Port: 2587, with STARTTLS. If the form has an encryption list, choose STARTTLS: the SSL option expects TLS from the first byte, which this port does not speak.

Username: mepmail, fixed for every team. Another name is refused before the key is checked.

Password: a key created under API keys, the one that starts with ms_, ideally one that can only send.

Encryption: STARTTLS before AUTH. Without a TLS keypair the relay does not start, unless the operator explicitly allows plaintext auth on a private network.

Settings → SMTP
Host: smtp.mepmail.dev
Port: 2587
Encryption: STARTTLS
Username: mepmail
Password: ms_... (a Send key)

Before the first message: the domain

The From address has to be on a domain verified for the team. An unverified domain is refused with 554 before anything is queued.

A key restricted to one domain only sends from that domain, over SMTP as well.

The relay does not take attachments today: a message with one is refused with 554, the same boundary POST /emails has.

Paste it in: WordPress, Ghost, n8n

  1. WordPress or WooCommerce: install an SMTP plugin, choose the option for another SMTP server, paste the five values, set the encryption to STARTTLS and send a test to your own address.
  2. Ghost, Strapi and Supabase Auth: the same values in the mail settings, with a From on the verified domain.
  3. n8n: the MepMail community node, n8n-nodes-mepmail, is the first-class path for sending; the relay is there for nodes that only speak SMTP.
  4. Any other system: fill the SMTP section, not the API section, and start with a test message to yourself.

What the relay checks, and its limits

  1. One From address, a non-empty Subject, and at least one To recipient that is also an envelope recipient.
  2. Up to 50 recipients per message, and 10 connections from the same IP at once.
  3. A message up to 40 MB; a larger one is refused.
  4. Only envelope recipients receive the message: To and Cc decide who is visible, and the rest are Bcc.
  5. Three failed logins on one connection close it with 421.

The error codes you will see

553: a single From address, a non-empty Subject, or a To that is also an envelope recipient is missing.

535: the username is not mepmail, or the password is not a valid key.

554: the From domain is not verified for the team, the sender is disguised, or the message carries an attachment.

550: the team is suspended, every recipient is suppressed, or the key is restricted to another domain.

452: more than 50 recipients, or a sending quota is exhausted, parked backlog included.

552: the message is over the size cap.

Test from the terminal

Python's standard library is enough to check the credentials and the domain before you touch the app. Replace the key and the two addresses:

send_test.py
import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg["From"] = "you@yourdomain.com"
msg["To"] = "you@example.com"
msg["Subject"] = "Relay test"
msg.set_content("It works.")

with smtplib.SMTP("smtp.mepmail.dev", 2587) as smtp:
    smtp.starttls()
    smtp.login("mepmail", "ms_...")
    smtp.send_message(msg)

Frequently asked questions

Does it work on port 587?

Use 2587 with STARTTLS. That is the port the relay listens on, and STARTTLS is the encryption it offers.

Which key becomes the password?

A Send key, the one that starts with ms_. The username stays mepmail for every team and every key.

How do I know it worked?

A successful send answers Queued as an id in the SMTP reply, and the message appears under Emails with the same events as an API send.

Do attachments work?

Not yet. The relay refuses a message with an attachment (554), the same limit POST /emails has; send a link to the file instead.

More guides

Put your app on the relay

Create an account, verify the domain and create a Send key. The same values are in Settings → SMTP.

Create free account

SMTP relay docs