Skip to main content
Overview Fluxomail supports CC/BCC and file attachments on the transactional send API. Attachments may be gated by plan and are subject to size/count limits for reliability and deliverability. API
  • Endpoint: POST /api/v1/emails/send
  • Fields:
    • cc: string or string[] — carbon copy recipients
    • bcc: string or string[] — blind carbon copy (not exposed in MIME headers)
    • attachments: array of { filename, contentBase64, contentType? }
Limits
  • Max attachments per email: ATTACHMENTS_MAX_COUNT (default 5)
  • Max total attachments size: ATTACHMENTS_MAX_TOTAL_MB (default 10 MB)
  • Invalid base64 or exceeding limits returns 400 with a descriptive error.
Entitlements
  • Attachments may be gated by plan. If disabled, requests with attachments return 402 (Payment Required).
  • Fluxomail enforces via Autumn (feature_id: attachments).
SDK (Node)
import { Fluxomail } from '@fluxomail/sdk'
import { readFile } from 'node:fs/promises'

const fm = new Fluxomail({ apiKey: process.env.FLUXOMAIL_API_KEY })

await fm.sends.send({
  to: 'user@example.com',
  subject: 'Hello',
  content: 'Hi there',
  attachments: [
    {
      filename: 'report.pdf',
      content: await readFile('report.pdf'),
      contentType: 'application/pdf'
    }
  ]
})
SDK (Browser)
import { Fluxomail } from '@fluxomail/sdk'

const fm = new Fluxomail({ token: '<short-lived>' })

const fileInput = document.querySelector('input[type=file]')!
const file = fileInput.files![0] // File extends Blob

await fm.sends.send({
  to: 'user@example.com',
  subject: 'Hello',
  attachments: [
    { filename: file.name, content: file, contentType: file.type }
  ]
})
CLI
fluxomail send \
  --api-key $FLUXOMAIL_API_KEY \
  --to user@example.com \
  --subject "Hello" \
  --text "Hi there" \
  --attach ./report.pdf:application/pdf:Q3-Report.pdf \
  --cc c1@example.com,c2@example.com \
  --bcc b1@example.com
Implementation notes
  • MIME: with attachments, Fluxomail builds multipart/mixed with an inner multipart/alternative (text + HTML) and appends each attachment as a base64 part.
  • BCC is included in the provider Destination only; no Bcc: header is emitted in MIME.
Monitoring
  • Logs (suggested): when attachments present — include count, total size, requestId, and reasons for denials.
  • Metrics (suggested): attachments.allowed.count, attachments.denied.count{reason}, attachments.total_count, attachments.total_bytes, attachments.total_size_mb.
Best practices
  • Keep total size small (≤10 MB) to maximize deliverability and reduce provider throttling.
  • Prefer links to large files hosted on your domain or storage provider.
  • For browsers, never use API keys — mint short‑lived tokens server‑side.