Sending Emails
Mailofly provides a robust, scalable infrastructure for sending transactional emails and system notifications. Whether sending verification codes, invoices, weekly digests, or alert notifications, Mailofly handles delivery with built-in DKIM signing, automatic rate limiting, and real-time delivery telemetry.Sending Methods
You can send emails using any of the following interfaces:- REST API (
POST /api/emails): Send emails over HTTP using cURL or your preferred HTTP client. - Official SDKs: Native, strongly-typed libraries for TypeScript/Node.js, Python, PHP, Go, and Dart.
- SMTP Gateway: Connect any standard SMTP client or framework (Nodemailer, Laravel, PHPMailer, Supabase) via
smtp.mailofly.com:587. - AI MCP Server: Enable AI coding assistants and autonomous agents to trigger sends with natural language.
Anatomy of a Send Request
A basic send request requires:from: Sender address with your verified domain (e.g.Acme <alerts@acme.com>).to: One or more recipient email addresses.subject: Subject line of the email.htmlortext: Content of the email (or atemplate_id).
attachments: Files or inline assets.scheduled_at: ISO-8601 timestamp for future delivery.headers: Custom headers (e.g.In-Reply-To,List-Unsubscribe).tags: Key-value pairs for filtering in analytics.