Integration Guide
This guide walks you through connecting a website to Mailprex.
Step 1 — Create an account
Register at mailprex.excelso.xyz , verify your email, and log in.
Step 2 — Generate a form token
- Open Dashboard → Form Token Management.
- Click Generate Form Token.
- Copy the full token immediately — it uses the
mk_live_…format and is only shown once. - Save it in an environment variable, for example:
MAILPREX_FORM_TOKEN=mk_live_xxxxxxxx…If you see a Legacy token banner, regenerate to migrate from the old UUID format.
Step 3 — Install the SDK
npm install mailprexFor custom field maps or non-React apps, see SDK v2.
Step 4 — Add the form
Minimum required body fields for /email/send:
| Field | Description |
|---|---|
formToken | Your dashboard token |
webName | Site or product name (email subject) |
emailDestiny | Inbox that receives the notification email |
fullname | Sender name from the form |
email | Sender email from the form |
message | Message body |
Optional: phone, service, captchaToken (when Turnstile is enabled on the API).
React (recommended)
Follow useMailprex or the complete example.
Plain fetch
await fetch("https://api.mailprex.excelso.xyz/email/send", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
formToken: process.env.MAILPREX_FORM_TOKEN,
webName: "My Site",
emailDestiny: "you@example.com",
fullname: "Jane",
email: "jane@example.com",
message: "Hello",
}),
});Step 5 — Test
Submit the form and check your inbox. If sending fails:
- Confirm
emailDestinyis a valid recipient address. - Confirm the token is the full
mk_live_…value, not just the dashboard prefix. - Check monthly quota on the dashboard (Free: 200/month).
Upgrade plan
Free users can upgrade to Pro from the dashboard when Gumroad billing is enabled. Use the same email on Gumroad as on Mailprex.
Self-host
Run your own API with Docker: Self-host guide.
Last updated on