Skip to content

Latest commit

 

History

History
296 lines (209 loc) · 6.58 KB

README.md

File metadata and controls

296 lines (209 loc) · 6.58 KB

PostMill 🏰⚔️

A swift and reliable email testing companion for developers, inspired by the windmills of La Mancha.

License: MIT Go Version Release


Contents

⚡ Quick Start

# 1. Desktop App (recommended)
Download PostMill.app from https://postmill.dev/download

# 2. Homebrew
brew install postmill

# 3. Direct Install
curl -L https://get.postmill.dev | sh

# Begin your adventure
postmill tilt

# Your windmill now stands ready:
# └─ SMTP: localhost:1025
# └─ Web:  http://localhost:8080

🚀 Why PostMill?

  • Simple: One command (or click) to start
  • Portable: Runs anywhere (CLI, desktop app or service)
  • Reliable: Built in Go, minimal dependencies
  • Practical: Real-time email testing
  • Delightful: Making email testing enjoyable

📜 The Tale

PostMill transforms email testing from a mundane task into a well-ordered adventure. Like the steadfast windmills of La Mancha, it stands ready to capture and present your development emails with unwavering reliability.

🛡️ Core Components

The Windmill (SMTP Server)

Stands watch over port 1025, catching all development emails with grace and precision.

postmill tilt --quest-port 1025   # SMTP port

Sancho (Worker Process)

The faithful companion, managing message processing and storage with steadfast reliability.

postmill tilt --sancho   # Enable verbose mode

The Watch Tower (Web Interface)

Your window into the email testing realm, where captured messages are displayed with simplicity and charm.

postmill tilt --windmill-port 8080   # UI port

📦 Installation

Choose the path that suits your quest:

Desktop Application

Download PostMill.app for your platform:

🚧 Under Construction 🚧

Command Line

# Homebrew (macOS & Linux)
brew install postmill

# Direct download (all platforms)
curl -L https://get.postmil.dev || sh

# Go developers
go install github.com/bashhack/postmill@latest

IDE Integration

🚧 Under Construction 🚧

⚔️ Command Reference

Begin your quest:

# Core Commands
postmill tilt                                    # Start all services
postmill halt                                    # Graceful shutdown

# Configuration
postmill tilt --quest-port 1025                 # SMTP port
postmill tilt --windmill-port 8080              # UI port
postmill tilt --tales-path ~/postmill_data      # Storage location
postmill tilt --sancho                          # Enable verbose mode

# Tale Management
postmill tales list                             # List all emails
postmill tales watch                            # Monitor in real-time
postmill tales clear                            # Clear all
postmill tales clear --older-than 24h           # Clear with age filter

# Status Commands
postmill status                                 # Show system status
postmill status --json                          # Machine-readable status

# Development Commands
postmill tilt --watch                           # Watch mode
postmill tilt --ci                              # CI mode

Advanced usage:

# Custom ports
postmill tilt --quest-port 2025 --windmill-port 8080

# Specific storage location
postmill tilt --la-mancha ~/postmill_data

# Development mode
postmill tilt --sancho --watch

⚙️ Configuration

# ~/.postmill.yaml
quest:
  port: 1025
  host: "0.0.0.0"

windmill:
  port: 8080
  theme: "light"  # or "dark"
  tales_per_page: 50

sancho:
  workers: 2
  wisdom: true    # verbose logging
  
la_mancha:
  scrolls: "~/.postmill/tales"
  memory: "24h"   # retention period

🔌 Integration

Rails

# config/environments/development.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
    address: 'localhost',
    port: 1025
}

Django

# settings.py 
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
EMAIL_USE_TLS = False

Node.js

// nodemailer configuration
const transport = nodemailer.createTransport({
    host: 'localhost',
    port: 1025,
    ignoreTLS: true
    secure: false,
    tls: {
        rejectUnauthorized: false
    }
});

Go

// Go stdlib
smtp.SendMail("localhost:1025", nil, 
    "[email protected]",
    []string{"[email protected]"},
    []byte("Hello!"))

// Go with gomail
d := gomail.NewDialer("localhost", 1025, "", "")

📊 Real-World Usage

Local Development

# Terminal 1: Start PostMill
postmill tilt --watch

# Terminal 2: Run your application
rails server  # or your app's start command

# Terminal 3: Monitor emails
postmill tales watch

CI Pipeline

# GitHub Actions
steps:
  - name: Setup PostMill
    run: |
      curl -L -o postmill https://get.postmill.dev
      chmod +x postmill
      ./postmill tilt --ci &

📚 Documentation

🌟 Pro Features

Upgrade your quest with PostMill Pro:

  • 📦 Extended message retention
  • 👥 Team collaboration features
  • 🔍 Advanced search capabilities
  • 📊 Email analytics
  • 🔗 REST API access
  • 💬 Priority support

Learn More About PostMill Pro

🤝 Contributing

Whether you're a knight of code or a squire of syntax, contributions are welcome! See the Contributing Guide for details.

📜 License

PostMill's core functionality is available under the MIT License. See the LICENSE file for details.

Some features marked as "Pro" require a separate commercial license. For more information:

PostMill® and the PostMill logo are trademarks of Marc Alvarez.


"Too much complexity may be madness. And maddest of all: to see email testing as it is, and not as it should be."

— Adapted from Don Quixote, with apologies to Cervantes

Made with ❤️ by bashhack.