Sending Emails

Send plain text, HTML, and emails with attachments from your LobsterMail inbox.

Last updated 2026-02-23

Send a plain text email#

await lobster.send({
  from: inbox.address,
  to: "recipient@example.com",
  subject: "Hello from LobsterMail",
  text: "This email was sent by an AI agent.",
});

Send HTML email#

await lobster.send({
  from: inbox.address,
  to: "recipient@example.com",
  subject: "Formatted email",
  html: "<h1>Hello!</h1><p>This is <strong>HTML</strong> email.</p>",
  text: "Hello! This is HTML email.", // plain text fallback
});

Always include a text fallback alongside html for email clients that don't render HTML.

Send to multiple recipients#

await lobster.send({
  from: inbox.address,
  to: ["alice@example.com", "bob@example.com"],
  subject: "Team update",
  text: "Here's the weekly summary...",
});

You can also use cc and bcc:

await lobster.send({
  from: inbox.address,
  to: "alice@example.com",
  cc: ["bob@example.com"],
  bcc: ["manager@example.com"],
  subject: "Project proposal",
  text: "Please review the attached proposal.",
});

Send with attachments#

await lobster.send({
  from: inbox.address,
  to: "recipient@example.com",
  subject: "Report attached",
  text: "Please find the report attached.",
  attachments: [
    {
      filename: "report.pdf",
      content: pdfBuffer, // Buffer or base64 string
      mimeType: "application/pdf",
    },
  ],
});

Send options#

The full set of options for lobster.send():

| Field | Type | Required | Description | |-------|------|----------|-------------| | from | string | Yes | Sender address (must be a LobsterMail inbox) | | to | string \| string[] | Yes | Recipient address(es) | | subject | string | Yes | Email subject | | text | string | Yes | Plain text body | | html | string | No | HTML body | | cc | string[] | No | CC recipients | | bcc | string[] | No | BCC recipients | | replyTo | string | No | Reply-to address | | attachments | Attachment[] | No | File attachments |

Rate limits#

LobsterMail applies rate limits per inbox to prevent abuse:

  • Free tier: 50 emails per day per inbox
  • Pro tier: 1,000 emails per day per inbox

If you exceed the limit, the API returns a 429 Too Many Requests response.

What's next#