Inbox Rules: Automate Email Forwarding, Labels, and Filtering
Automate your disposable inbox with rules that forward emails to your personal address, apply custom labels, or auto-delete spam. Configure up to 50 rules per account with regex pattern matching.
6 min read
When you sign up for a service with a disposable email, you often need the verification code forwarded to your real inbox, or you want to automatically discard marketing emails while keeping transactional ones. Inbox Rules let you set up these automations once and forget about them.
Available on Pro and Business plans, inbox rules process every incoming email against your defined patterns and trigger actions before the message is even stored. Pro accounts get 10 rules; Business accounts get 50.
How Inbox Rules Work
When an email arrives at your inbox, the system evaluates it against your rules in priority order (lowest number first). The first matching rule executes its action. If no rules match, the email is stored normally.
Each rule can match on two fields:
- Sender pattern: regex match against the sender's email address (e.g.,
.*@github\.com) - Subject pattern: regex match against the email subject line (e.g.,
(invoice|receipt))
You can use one or both patterns. If both are specified, the email must match both for the rule to trigger.
Three Rule Actions
Forward
Route matching emails to an external email address. This is useful when you want verification codes or important notifications sent directly to your personal inbox while keeping the disposable address as the public-facing one.
Forwarded emails preserve original headers so your personal email client can properly display the sender, subject, and threading.
Label
Apply a custom label to matching emails. Labels are color-coded tags you create and assign via rules. They make it easy to filter and organize messages when an inbox receives emails from multiple sources.
Pro accounts can create up to 10 labels; Business accounts get 50.
Delete
Discard matching emails before they're stored. The email is processed and evaluated, but never saved to your inbox. Use this for known spam domains or marketing emails you don't want cluttering your inbox.
Creating Rules with the SDK
// setup-rules.ts
import { Dissolve } from "@dissolve-email/sdk";
const dissolve = new Dissolve({ apiKey: process.env.DISSOLVE_API_KEY });
// Forward all GitHub emails to your personal inbox
await dissolve.inboxRules.create({
name: "Forward GitHub emails",
senderPattern: ".*@github\.com",
action: "forward",
forwardTo: "me@gmail.com",
priority: 1,
});
// Auto-delete emails from known spam domains
await dissolve.inboxRules.create({
name: "Block spam",
senderPattern: ".*@(spam-domain|junk-mail)\.com",
action: "delete",
priority: 2,
});
// Label all receipts for easy filtering
await dissolve.inboxRules.create({
name: "Tag receipts",
subjectPattern: "(invoice|receipt|payment|order confirmation)",
action: "label",
labelId: "lbl_receipts",
priority: 3,
});
Rules are evaluated in priority order. Set lower numbers for rules you want checked first. The first match wins, and subsequent rules are skipped for that message.
Custom Labels
// labels.ts
// Create custom labels with colors
const label = await dissolve.labels.create({
name: "Receipts",
color: "#10b981", // emerald
});
// Labels are automatically applied by rules
// You can also filter messages by label
const receipts = await dissolve.messages.list(inbox.id, {
labelId: label.id,
});
Labels support hex color codes so you can visually distinguish categories at a glance. Once a label rule is in place, every matching email is tagged automatically.
Inbox-Level Email Forwarding
Besides rule-based forwarding, you can enable forwarding at the inbox level. When turned on, every email received at that inbox is automatically forwarded to your specified address.
// forwarding.ts
// Enable email forwarding on an inbox
const inbox = await dissolve.inboxes.create({
name: "forwarded-inbox",
domain: "dissolve.email",
});
// Any email received is forwarded to your real address
await dissolve.inboxes.update(inbox.id, {
forwardTo: "me@gmail.com",
});
// Rules override inbox-level forwarding
// If a rule matches, its action runs instead
If a rule matches an incoming email, the rule's action takes precedence over inbox-level forwarding. This lets you set up a catch-all forward while still deleting or labeling specific messages.
Inbox Templates
If you find yourself creating inboxes with the same forwarding, webhook, and domain settings every time, save them as a template. Free accounts can save 3 templates, Pro gets 10, and Business gets 25.
// templates.ts
// Save common inbox configurations as templates
await dissolve.inboxTemplates.create({
name: "QA Testing Template",
domain: "dissolve.email",
forwardTo: "qa-team@company.com",
webhookUrl: "https://hooks.slack.com/services/T.../B.../xxx",
isDefault: true, // used when creating inboxes without options
});
// Create an inbox from the template
const inbox = await dissolve.inboxes.create({
templateId: "tpl_abc123",
});
// Inbox inherits all template settings
Set a template as default and every new inbox you create will inherit those settings automatically.
cURL Example
Rules are managed through the standard REST API, so you can configure them from any language or tool:
# Create a forwarding rule via cURL
curl -X POST https://api.dissolve.email/api/rules \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Forward GitHub",
"senderPattern": ".*@github\\.com",
"action": "forward",
"forwardTo": "me@gmail.com",
"priority": 1
}'
Real-World Use Cases
- Forward verification codes: sign up to services with a disposable address but get the codes sent to your real inbox
- Filter by sender: keep transactional emails from Stripe or GitHub, delete everything else
- Organize test emails: label emails by service when running QA tests against multiple providers
- Block spam domains: auto-delete emails from known spam senders so they never reach your inbox
- Webhook + forward combo: forward the email to your team while also triggering a Slack notification via webhook
Plan Limits
- Free: no inbox rules, no labels, no email forwarding
- Pro ($5/mo): 10 rules, 10 labels, email forwarding
- Business ($15/mo): 50 rules, 50 labels, email forwarding, priority support
Get Started
Inbox rules are available now on Pro and Business plans. Upgrade your plan to start automating your disposable inboxes, or read the API documentation for the full rules endpoint reference.
Try it while you read
A disposable inbox takes one press on the home page. No signup.
Keep reading
Tutorials
Temp Mail API for Developers: Disposable Email REST API Guide
A complete guide to creating and managing disposable email addresses via the dissolve.email API. Includes examples in TypeScript, cURL, and Python for CI/CD testing, signup automation, and webhook integrations.
7 min read
Product updates
Team Shared Inboxes: Real-Time Email Collaboration for QA
Create shared disposable inboxes that your entire QA team can view in real-time. Live presence indicators show who's online, read receipts track who's seen each message, and WebSocket connections deliver emails instantly.
6 min read
Product updates
AI Agent Identities: Automate Signups for Cursor & AI Tools
Instantly create temporary email + password identity pairs for your AI agents. Automate signup flows, extract verification codes, and let Cursor, Claude, or any AI tool operate independently. No human inbox needed.
9 min read