### Send email with cURL to api.mailcraft.tech/api/send-email Source: https://mailcraft.tech Sends a transactional email via the MailCraft REST API. Requires an API key (x-api-key) and a JSON payload with from, to, subject, and html fields. The example uses a live API key and a sample OTP email. ```bash curl -X POST "https://api.mailcraft.tech/api/send-email" \ -H "x-api-key: mc_live_8f3d9a1c2e4b5d6e7f" \ -H "Content-Type: application/json" \ -d '{ "from": "sender@yourdomain.com", "to": "customer@company.com", "subject": "OTP Verification Code", "html": "

Your secure verification code is 839201.

" }' ``` -------------------------------- ### BullMQ Outbound Worker and Webhook Response Source: https://mailcraft.tech Shows a BullMQ worker that processes jobs from the 'transactional-queue' and sends email via SES, then the webhook payload it triggers. Use together to understand the queue-to-webhook flow for delivery tracking. ```javascript // BullMQ Outbound Workers const worker = new Worker( 'transactional-queue', async (job) => { const { to, html } = job.data; await ses.send({ to, html }); // Sync live metrics await trackDelivery(job.id); } ); ``` ```json // webhook callback response { "event": "email.delivered", "data": { "messageId": "msg_9a8b7c6d", "recipient": "user@domain.com", "deliveredAt": "120ms" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.