Skip to main content

Message Submission

Message Submission

WildDuck allows sending emails directly through the HTTP API, without requiring an SMTP client. This is particularly useful for webmail interfaces and automated systems.

Endpoint

POST /users/:user/submit

This endpoint composes and queues a message for delivery through ZoneMTA.

Request Format

The request body includes:

  • from — Sender address (must match one of the user's registered addresses)
  • to / cc / bcc — Recipient addresses
  • subject — Message subject
  • text — Plain text body
  • html — HTML body
  • headers — Custom headers (optional)
  • attachments — File attachments (optional)
  • reference — Reference to previous messages (for replies/forwards)
  • draft — If true, saves as draft instead of sending

Attachments

Attachments can be included inline in the request or referenced from the Storage API (for draft attachments that were uploaded separately).

How It Works

  1. The API validates the sender address against the user's registered addresses
  2. The message is composed using Nodemailer
  3. The composed message is submitted to ZoneMTA's maildrop queue
  4. ZoneMTA handles DKIM signing and delivery
  5. A copy is saved to the user's Sent Mail folder

Difference from SMTP Submission

FeatureAPI SubmissionSMTP Submission
ProtocolHTTP RESTSMTP (port 587)
AuthenticationAPI tokenSMTP AUTH (password/ASP)
ClientAny HTTP clientEmail client / SMTP library
Best forWebmail, integrationsDesktop/mobile email clients

Both paths ultimately queue through ZoneMTA for delivery.