Mail Catcher
Mail Catcher is an integrated SMTP mail server in Xermius that allows you to receive, store, and preview emails sent through the SMTP server during development and testing.
Overview
What is Mail Catcher? Instead of sending real emails during development, you can catch all emails to see how they work.
Common use cases:
- Test email templates and layouts
- Verify email content and formatting
- Debug email sending issues
- Test attachment handling
- Check spam score
Getting Started
1. Access Mail Catcher
- Open the Xermius app
- Navigate to the Mail Catcher tab in the sidebar
- Server starts automatically
2. Configure Your SMTP Client
To have your app send emails to Mail Catcher, configure your SMTP client as follows:
// Example with Nodemailer
const nodemailer = require('nodemailer')
const transporter = nodemailer.createTransport({
host: 'localhost',
port: 1025,
auth: {
user: 'admin',
pass: 'your-password'
}
})
await transporter.sendMail({
from: 'sender@example.com',
to: 'test@localhost',
subject: 'Test Email',
html: '<h1>Hello World</h1>'
})
3. Server Settings
| Setting | Description | Default |
|---|---|---|
| Port | SMTP server port | 1025 |
| Host | Server host | localhost |
| Authentication | Require auth | Optional |
| Encryption | TLS/SSL/None | None |
Mailboxes
Creating a Mailbox
- Click Add Mailbox button
- Enter a unique email address (e.g.,
dev@localhost) - Mailbox is created and will receive emails sent to that address
Managing Mailboxes
- Edit: Change mailbox address
- Delete: Delete mailbox and its emails
- Auto-route: Emails automatically routed based on recipient
Viewing Emails
Email List
The email list displays:
- Sender and recipient
- Subject line
- Timestamp
- Read/Unread status
- Attachment indicator
Email Viewer
Click on an email to view details:
| Tab | Description |
|---|---|
| Preview | HTML rendered preview (sandboxed) |
| Source | Syntax-highlighted HTML source |
| Text | Plain text version |
| Raw | Complete raw email data |
| Headers | Formatted email headers |
Links in Emails
Mail Catcher automatically extracts and checks links in emails:
- Display all URLs in the email
- Check link status (working/broken)
- Click to copy link
Attachments
Viewing Attachment List
Each email displays a list of attachments:
- File name
- File size
- File type
Previewing Attachments
- Images: Preview directly in the app
- PDFs: Inline preview
- Other files: Download to view
Downloading Attachments
- Click attachment in email
- Choose Download
- File is saved to disk
Advanced Features
Spam Score Checking
Mail Catcher can analyze email spam score:
- Check against spam filters
- Display score breakdown
- Suggestions to improve score
Broken Link Detection
Automatically check links in email:
- Validate all URLs
- Mark broken links
- Help ensure emails arrive correctly
Real-time Notifications
Desktop notifications when new email arrives:
- Instant alert when email arrives
- No need to keep app in foreground
- Click notification to open email
Email Search
Search across all emails:
- Search by sender, recipient, subject, content
- Filter by date range
- Quick access to specific emails
Settings
Server Controls
| Control | Description |
|---|---|
| Start/Stop | Enable/disable SMTP server |
| Port | Change port |
| Auto-start | Start server when app launches |
Security Settings
| Setting | Description |
|---|---|
| Require Auth | Require SMTP authentication |
| TLS/SSL | Enable encryption |
| Allowed Senders | Restrict who can send |
Storage Settings
| Setting | Description |
|---|---|
| Max Email Size | Limit email size |
| Retention | Auto-delete emails after X days |
| Storage Path | Where emails are stored |
Troubleshooting
Emails Not Received
- Check Mail Catcher server is running
- Verify SMTP port is correct (default: 1025)
- Check firewall is not blocking port
- Verify authentication credentials
Preview Not Displaying
Cause: HTML emails rendered in sandbox iframe
Solution:
- Click "Open in New Tab" to view in browser
- Or view the Source tab for raw HTML
Server Won't Start
- Check port is not used by another service
- Try restarting Xermius
- Check logs for error details
Security
- Local Only: Server only listens on localhost/local network
- Authentication: Optional authentication for SMTP connections
- Sandboxed Preview: HTML emails rendered in sandbox iframe
- File Limits: Upload size limits configurable
- Input Validation: All input validated and sanitized
Limitations
| Limit | Value |
|---|---|
| Max Email Size | Configurable (default 10MB) |
| Storage | Manual cleanup required |
| Spam Checking | Requires external service |