Skip to main content

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

  1. Open the Xermius app
  2. Navigate to the Mail Catcher tab in the sidebar
  3. 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

SettingDescriptionDefault
PortSMTP server port1025
HostServer hostlocalhost
AuthenticationRequire authOptional
EncryptionTLS/SSL/NoneNone

Mailboxes

Creating a Mailbox

  1. Click Add Mailbox button
  2. Enter a unique email address (e.g., dev@localhost)
  3. 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:

TabDescription
PreviewHTML rendered preview (sandboxed)
SourceSyntax-highlighted HTML source
TextPlain text version
RawComplete raw email data
HeadersFormatted email headers

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

  1. Click attachment in email
  2. Choose Download
  3. 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

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

Search across all emails:

  • Search by sender, recipient, subject, content
  • Filter by date range
  • Quick access to specific emails

Settings

Server Controls

ControlDescription
Start/StopEnable/disable SMTP server
PortChange port
Auto-startStart server when app launches

Security Settings

SettingDescription
Require AuthRequire SMTP authentication
TLS/SSLEnable encryption
Allowed SendersRestrict who can send

Storage Settings

SettingDescription
Max Email SizeLimit email size
RetentionAuto-delete emails after X days
Storage PathWhere emails are stored

Troubleshooting

Emails Not Received

  1. Check Mail Catcher server is running
  2. Verify SMTP port is correct (default: 1025)
  3. Check firewall is not blocking port
  4. 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

  1. Check port is not used by another service
  2. Try restarting Xermius
  3. 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

LimitValue
Max Email SizeConfigurable (default 10MB)
StorageManual cleanup required
Spam CheckingRequires external service

Next Steps