What You Can Build
- Support Ticket Systems - Automatically create tickets from customer emails
- Reply Tracking - Capture replies to your transactional emails and thread conversations
- Email-to-Action Workflows - Trigger processes when specific emails arrive
- Data Extraction - Parse structured data from incoming emails (orders, receipts, notifications)
- Email Forwarding - Receive, process, and forward emails with transformations
- Unsubscribe Processing - Handle unsubscribe requests via email
How It Works
Lettr’s inbound email processing follows a four-step flow. You configure DNS to route emails to Lettr’s mail servers, and Lettr parses each email into structured data and delivers it to your application via webhook.1
Configure Inbound Domain
Add an inbound domain in your Lettr dashboard and configure MX records to route incoming emails to Lettr’s mail servers.
2
Set Up Webhook
Create a webhook endpoint in your application to receive parsed email data when emails arrive.
3
Receive and Process
When someone sends an email to your inbound domain, Lettr parses it and sends the structured data to your webhook.
4
Build Your Logic
Route emails, extract data, trigger workflows, and respond programmatically.
Quick Start
1. Add an Inbound Domain
Navigate to Domains → Inbound in your dashboard, click Add Domain, and enter your domain (e.g.,mail.example.com).
Inbound domain management is available through the Lettr dashboard. There is no public API endpoint for creating or managing inbound domains.
2. Configure DNS
Add the provided MX records to your domain:
Multiple MX records with equal priority provide load balancing — sending servers distribute email across all three servers. If one is unavailable, the others handle delivery. See the Setup Guide for DNS propagation details.
3. Handle Incoming Emails
Set up a webhook endpoint to receive parsed emails:Webhook Payload
When an email is received, Lettr sends arelay.relay_delivery webhook event. The payload is delivered as a JSON array of event objects, each containing a relay message with the parsed email:
Key Capabilities
Email Routing
Route incoming emails to different handlers based on recipient, content, or custom rules:reply+ pattern above is called variable addressing (or plus addressing). It’s a common way to encode context in the recipient address so you can route replies back to the right record. See Routing for more patterns including routing by subject, sender domain, and content.
Spam Filtering
Every email includes a spam score, and you can configure automatic filtering:Attachment Handling
Attachments are automatically extracted and made available via secure URLs:filename, contentType, size (in bytes), and a download url. See Attachments for storage examples (S3, GCS) and security best practices including file type verification and malware scanning.
Reply Tracking
Track replies to your transactional emails by using variable reply-to addresses:Message-ID, In-Reply-To, and References to build full conversation threads. See Reply Tracking for header-based threading, auto-reply detection, and a complete support ticket example.
Real-World Examples
Support Ticket System
Create support tickets from incoming emails and track the conversation thread:Email-to-Task Automation
Parse incoming emails to create tasks in your project management system:Using Subdomains
We recommend using a subdomain for inbound email to keep it separate from your primary email:
This lets you keep your root domain’s MX records pointing to your regular email provider while routing specific subdomains through Lettr.
Processing Best Practices
- Respond quickly — Return a
200status from your webhook endpoint within a few seconds. If processing is complex, accept the webhook and process asynchronously via a queue. - Handle duplicates — Webhooks may be delivered more than once. Use the event
idto deduplicate. - Store before processing — Save the raw webhook payload before doing any processing, so you can replay events if something fails.
- Validate attachments — Verify file types and scan for malware before processing attachments from unknown senders.
Learn More
Setup Guide
Step-by-step domain and webhook configuration
Webhooks
Webhook configuration and event handling
Routing
Route emails to different handlers
Attachments
Handle incoming file attachments
Spam Filtering
Filter and manage spam
Reply Tracking
Track and thread email replies
Email Parsing
Understanding parsed email data
Security
Secure your inbound processing
Best Practices
Build reliable email processing
Related Topics
Inbound Domains
Domain configuration details
Webhooks Overview
General webhook documentation