Skip to main content

Sending Emails

Lettr provides a powerful and flexible API for sending transactional and marketing emails.

Basic Email

Send a simple email with minimal configuration:
await lettr.emails.send({
  from: 'you@example.com',
  to: ['recipient@example.com'],
  subject: 'Hello World',
  html: '<p>This is my first email!</p>'
});

Email Options

ParameterTypeRequiredDescription
fromstringYesSender email address
tostring[]YesArray of recipient addresses
subjectstringYesEmail subject line
htmlstringNoHTML content
textstringNoPlain text content
ccstring[]NoCC recipients
bccstring[]NoBCC recipients
replyTostringNoReply-to address
attachmentsarrayNoFile attachments
headersobjectNoCustom headers
tagsarrayNoEmail tags for analytics
metadataobjectNoCustom metadata
scheduledAtstringNoISO 8601 date for scheduled sending

Response

{
  "id": "email_123abc",
  "from": "you@example.com",
  "to": ["recipient@example.com"],
  "subject": "Hello World",
  "status": "sent",
  "createdAt": "2024-01-15T10:30:00Z"
}

Learn More