Skip to main content

Sending Emails πŸ“¨

Think of Mailofly as your super-reliable postman, except instead of putting envelopes in mailboxes, it shoots emails across the internet at lightning speed. You tell Mailofly: β€œhey, send this to that person” β€” and it takes care of everything else. Signing, routing, rate limiting, delivery tracking β€” all handled.

Ways to send

You’ve got four options, pick whatever fits your vibe:
  1. REST API β€” make a simple POST request from literally any language or tool.
  2. Official SDKs β€” ready-made libraries for TypeScript, Python, PHP, Go, and Dart. They do all the boring HTTP stuff for you.
  3. SMTP Gateway β€” already using Nodemailer, Laravel, PHPMailer, or Supabase? Just point them at smtp.mailofly.com and you’re done.
  4. AI / MCP Server β€” let AI tools and code assistants trigger sends for you. Futuristic stuff.

What every email needs

When you send an email, you need at least these things:
  • from β€” who it’s coming from. Must be a domain you’ve verified (e.g. Hi Team <hello@yourcompany.com>).
  • to β€” who’s getting it. You can send to multiple people at once.
  • subject β€” the subject line. Make it interesting!
  • html or text β€” the actual content. HTML for pretty, text for plain.
You can also add optional extras:
  • πŸ“Ž attachments β€” PDFs, images, files, etc.
  • πŸ• scheduled_at β€” send it at a specific time in the future.
  • 🏷️ tags β€” label your emails for analytics filtering.
  • πŸ’¬ headers β€” custom email headers if you need them.

Where to go next