Skip to content

Commit 53371fc

Browse files
committed
Add MkDocs documentation site; simplify README (fixes #220)
- MkDocs Material site deployed to www.papercut-smtp.com via GitHub Pages - New guides: How It Works, Getting Started, Send Email from Your App (multi-language examples), Desktop, Service, Docker, TLS, Troubleshooting - README reduced to pitch + install + links into the docs site
1 parent 30dd96a commit 53371fc

15 files changed

Lines changed: 802 additions & 132 deletions

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
- '.github/workflows/docs.yml'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: pages
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: '3.x'
34+
35+
- name: Install MkDocs Material
36+
run: pip install mkdocs-material
37+
38+
- name: Build docs
39+
run: mkdocs build --strict
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: site
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ Releases
2727
settings.local.json
2828
TestResults/
2929
.DS_Store
30+
31+
# MkDocs build output
32+
site/

README.md

Lines changed: 23 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,45 @@
11
![Papercut Logo](https://raw.githubusercontent.com/ChangemakerStudios/Papercut/develop/graphics/PapercutLogo.png)<br>
2-
*The Simple Desktop Email Helper*
2+
*The Simple Desktop Email Receiver*
33

44
[![Build and Release](https://github.com/ChangemakerStudios/Papercut-SMTP/actions/workflows/build.yml/badge.svg)](https://github.com/ChangemakerStudios/Papercut-SMTP/actions/workflows/build.yml)
5+
[![GitHub release](https://img.shields.io/github/v/release/ChangemakerStudios/Papercut-SMTP?label=release)](https://github.com/ChangemakerStudios/Papercut-SMTP/releases/latest)
6+
[![Docker Pulls](https://img.shields.io/docker/pulls/changemakerstudiosus/papercut-smtp?logo=docker)](https://hub.docker.com/r/changemakerstudiosus/papercut-smtp)
57

6-
## The problem
7-
If you ever send emails from an application or website during development, you're familiar with the fear of an email being released into the wild. Are you positive none of the 'test' emails are addressed to colleagues or worse, customers? Of course, you can set up and maintain a test email server for development -- but that's a chore. Plus, the delay when waiting to view new test emails can radically slow your development cycle.
8+
Papercut SMTP is a 2-in-1 quick email viewer **and** built-in SMTP server for development. Point your application at `localhost:25` and every email it sends is caught, displayed instantly, and **never delivered anywhere** — body, HTML, headers, attachments, and raw bits included.
89

9-
<img src="https://raw.githubusercontent.com/ChangemakerStudios/Papercut-SMTP/refs/heads/develop/graphics/papercut-choice.png" width="400" />
10-
11-
## Papercut SMTP to the rescue!
12-
Papercut SMTP is a 2-in-1 quick email viewer AND built-in SMTP server (designed to receive messages only). Papercut SMTP doesn't enforce any restrictions on how you prepare your email, but it allows you to view the whole email-chilada: body, HTML, headers, and attachment right down to the naughty raw encoded bits. Papercut can be configured to run on startup and sit quietly (minimized in the tray) only providing a notification when a new message has arrived.
13-
14-
## Download Desktop App Now
15-
#### Download the 64-bit [PapercutSMTP-win-X64-stable-Setup.exe](https://github.com/ChangemakerStudios/Papercut-SMTP/releases) desktop installer in releases.
16-
#### Download the 32-bit [PapercutSMTP-win-x86-stable-Setup.exe](https://github.com/ChangemakerStudios/Papercut-SMTP/releases) desktop installer in releases.
17-
18-
**For installation options, command-line parameters, and silent/unattended installation instructions, see the [Installation Guide](installation/README.md).**
19-
20-
## Requirements
21-
Papercut SMTP UI Requires the "WebView2" Microsoft shared system component to be installed on your system. If you have any problems getting it running go to this site:
22-
[WebView2 Download](https://developer.microsoft.com/en-us/microsoft-edge/webview2) and install it.
23-
24-
## Features
25-
#### Instant Feedback When New Email Arrives
26-
![Instant Feedback When New Email Arrives](https://github.com/ChangemakerStudios/Papercut-SMTP/blob/develop/graphics/PapercutV7-Notification-1.png?raw=true)
27-
#### Rich and Detailed View of Received Email
2810
![Rich and Detailed View of Received Email](https://raw.githubusercontent.com/ChangemakerStudios/Papercut-SMTP/refs/heads/develop/graphics/PapercutV7-Main-1.png)
29-
#### View and Download the Mime Sections of your Email
30-
![View and Download the Mime Sections of your Email](https://changemakerstudios.us/content/images/2020/07/Papercut-Mime.png)
31-
#### Raw View
32-
![Raw View](https://changemakerstudios.us/content/images/2020/07/Papercut-Raw.png)
33-
#### Logging View
34-
![Logging View](https://changemakerstudios.us/content/images/2020/07/Papercut-Log.png)
35-
36-
## (Optional) Download Papercut SMTP Service
37-
Papercut SMTP has an optional HTTP server to receive emails even when the client is not running.
38-
It can be run in an almost portable way by downloading [Papercut.Smtp.Service.*.zip](https://github.com/ChangemakerStudios/Papercut-SMTP/releases), unzipping, and installing as a Windows Service.
39-
40-
### Papercut SMTP Web UI
41-
42-
The service includes a built-in web interface for viewing received emails in your browser (default: **http://localhost:8080**):
43-
44-
![Papercut SMTP Web UI - Message List](https://github.com/ChangemakerStudios/Papercut-SMTP/blob/develop/graphics/PapercutWebUI-V7-1.png?raw=true)
45-
![Papercut SMTP Web UI - Message Detail](https://github.com/ChangemakerStudios/Papercut-SMTP/blob/develop/graphics/PapercutWebUI-V7-2.png?raw=true)
46-
47-
### Installing Papercut SMTP Service
4811

49-
1. **Download** the appropriate [Papercut.Smtp.Service.*.zip](https://github.com/ChangemakerStudios/Papercut-SMTP/releases) for your system (win-x64 or win-x86)
50-
2. **Extract** the zip file to your desired location
51-
3. **Run the installation script** (requires administrator privileges):
52-
- **Option A:** Double-click `install-papercut-service.bat`
53-
- **Option B:** Run `install-papercut-service.ps1` in PowerShell
54-
4. The service will be installed and configured to **start automatically** on system boot
12+
## Install
5513

56-
**To uninstall:** Run `uninstall-papercut-service.bat` or `uninstall-papercut-service.ps1`
14+
**[Download the installer](https://github.com/ChangemakerStudios/Papercut-SMTP/releases/latest)** (x64 / x86 / ARM64), or:
5715

58-
**For complete Service configuration and Docker deployment instructions, see the [Service README](src/Papercut.Service/Readme.md).**
59-
60-
### Host in Docker
61-
62-
Optionally run Papercut SMTP Service in Docker: [Papercut SMTP on Docker Hub](https://hub.docker.com/r/changemakerstudiosus/papercut-smtp)
63-
64-
**Quick start:**
6516
```powershell
66-
docker pull changemakerstudiosus/papercut-smtp:latest
67-
docker run -d -p 37408:8080 -p 2525:2525 changemakerstudiosus/papercut-smtp:latest
17+
winget install ChangemakerStudios.Papercut-SMTP
6818
```
6919

70-
Access at: **http://localhost:37408** | Send emails to: **localhost:2525**
71-
72-
> **Note:** Docker uses non-privileged ports by default (SMTP: 2525, HTTP: 8080). See the [Service README](src/Papercut.Service/Readme.md#option-3-run-in-docker) for configuration options, Docker Compose examples, and troubleshooting.
73-
74-
### Aspire Integration
75-
76-
Papercut SMTP can be used for local email testing with Aspire projects. The integration exposes a connection string with the format `endpoint=smtp://<host>:<port>` which can be used to configure the SMTP client.
77-
78-
#### Setup
79-
80-
Install the package `CommunityToolkit.Aspire.Hosting.PapercutSmtp` from NuGet and then configure the integration in your App Host as follows:
81-
82-
```c#
83-
var builder = DistributedApplication.CreateBuilder(args);
20+
Run it — Papercut is immediately listening on `127.0.0.1:25`. Configure your app to send there and you're done.
8421

85-
var papercut = builder.AddPapercutSmtp("papercut");
86-
87-
builder.AddProject<Projects.ExampleProject>()
88-
.WithReference(papercut)
89-
.WaitFor(papercut);
90-
```
91-
92-
After running, the ports for both the Papercut UI and the SMTP service are automatically assigned and accessible through the Aspire dashboard.
93-
94-
## SMTP Authentication and TLS/STARTTLS Support
95-
96-
Papercut SMTP Server supports optional SMTP authentication and TLS/STARTTLS encryption for secure email testing.
97-
98-
### Quick Setup
99-
100-
**Step 1: Create a test certificate** (PowerShell):
101-
102-
```powershell
103-
New-SelfSignedCertificate -Subject "CN=localhost" -DnsName "localhost" `
104-
-CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(2)
105-
```
106-
107-
**Step 2: Enable TLS/STARTTLS** in your `appsettings.json`:
108-
109-
```json
110-
{
111-
"SmtpServer": {
112-
"CertificateFindType": "FindBySubjectName",
113-
"CertificateFindValue": "localhost",
114-
"Port": 587
115-
}
116-
}
117-
```
118-
119-
That's it! The server will automatically find your "localhost" certificate.
120-
121-
### Docker with TLS
122-
123-
Mount a certificate and configure via environment variables:
22+
## Docker
12423

12524
```bash
126-
docker run -d \
127-
-p 587:587 \
128-
-p 8080:8080 \
129-
-e SmtpServer__CertificateFindType=FindBySubjectName \
130-
-e SmtpServer__CertificateFindValue=localhost \
131-
changemakerstudiosus/papercut-smtp:latest
25+
docker run -d -p 8080:8080 -p 2525:2525 changemakerstudiosus/papercut-smtp:latest
13226
```
13327

134-
**Or use Docker Compose** (see [Service README](src/Papercut.Service/Readme.md) for complete examples).
28+
Web UI at **http://localhost:8080**, SMTP on **localhost:2525**. Details on [Docker Hub](https://hub.docker.com/r/changemakerstudiosus/papercut-smtp).
13529

136-
### Features
30+
## Documentation
13731

138-
-**TLS/STARTTLS** support on any port (recommended: 587)
139-
-**SMTP AUTH** with flexible authentication (accepts all credentials in dev mode)
140-
-**Certificate store integration** (Windows LocalMachine/CurrentUser stores)
141-
-**Multiple search methods** (Thumbprint, SubjectName, etc.)
142-
-**Backward compatible** (TLS disabled by default)
32+
**[www.papercut-smtp.com](https://www.papercut-smtp.com/)** — full documentation:
14333

144-
### Configuration Options
34+
- [How It Works](https://www.papercut-smtp.com/how-it-works/) — what Papercut is (and isn't), in two minutes
35+
- [Getting Started](https://www.papercut-smtp.com/getting-started/) — install, first run, first test email
36+
- [Send Email from Your App](https://www.papercut-smtp.com/send-from-your-app/) — copy-paste config for .NET, Node, Python, PHP, Java, Ruby
37+
- [Desktop App](https://www.papercut-smtp.com/desktop/) · [Service & Web UI](https://www.papercut-smtp.com/service/) · [Docker](https://www.papercut-smtp.com/docker/) · [TLS & Auth](https://www.papercut-smtp.com/smtp-tls-auth/)
38+
- [Troubleshooting](https://www.papercut-smtp.com/troubleshooting/)
14539

146-
| Setting | Description | Default | Example |
147-
|---------|-------------|---------|---------|
148-
| `CertificateFindType` | Certificate search method | `FindBySubjectName` | `FindBySubjectName` |
149-
| `CertificateFindValue` | Certificate name or identifier (empty = TLS disabled) | `""` | `localhost` |
150-
| `CertificateStoreLocation` | Store location | `LocalMachine` | `LocalMachine` or `CurrentUser` |
151-
| `CertificateStoreName` | Store name | `My` | `My` (Personal) |
152-
| `Port` | SMTP port | `25` | 587 (STARTTLS recommended) |
40+
## Release History
41+
42+
See [ReleaseNotes.md](ReleaseNotes.md) for the full release history.
15343

15444
## Star History
15545

@@ -162,4 +52,5 @@ docker run -d \
16252
</a>
16353

16454
## License
165-
Papercut SMTP is Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
55+
56+
Papercut SMTP is licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
www.papercut-smtp.com

docs/desktop.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Desktop App
2+
3+
The Papercut SMTP desktop app is both the SMTP server and the viewer — when it's running, you're catching email.
4+
5+
## Message Views
6+
7+
Select a message to inspect every layer of it:
8+
9+
- **Message** — the rendered HTML, exactly as an email client would show it (embedded images included)
10+
- **Headers** — the full header list
11+
- **Body** — the plain-text body
12+
- **Sections** — every MIME part, viewable and downloadable individually (attachments included)
13+
- **Raw** — the raw encoded message source
14+
15+
Right-click works everywhere you'd expect: copy selected text, copy or open links in the HTML view, and Copy / Select All in the Headers, Body, and Raw views.
16+
17+
![Rich and Detailed View of Received Email](https://raw.githubusercontent.com/ChangemakerStudios/Papercut-SMTP/refs/heads/develop/graphics/PapercutV7-Main-1.png)
18+
19+
## Notifications & the Tray
20+
21+
New mail triggers a toast notification. Papercut can minimize to the system tray and sit silently until something arrives:
22+
23+
![Instant Feedback When New Email Arrives](https://raw.githubusercontent.com/ChangemakerStudios/Papercut-SMTP/develop/graphics/PapercutV7-Notification-1.png)
24+
25+
Configure minimize-to-tray, minimize-on-close, and run-on-startup behavior in **Options**.
26+
27+
## Managing Messages
28+
29+
- Messages are stored as standard **`.eml` files** — right-click → open the containing folder to grab them directly
30+
- **Delete** removes the selected message(s); **Delete All** clears everything older than the moment you confirm
31+
- **Forward** a received message on to a real SMTP server (with optional authentication) when you need to get a captured email out
32+
33+
## Rules
34+
35+
Papercut can act on messages automatically as they arrive:
36+
37+
- **Forward** — pass received messages along to another SMTP server (supports authentication)
38+
- **Relay** — conditionally relay matching messages
39+
- **Retention** — periodically prune old messages
40+
41+
Configure rules from the main window; if the [background service](service.md) is running, rule and settings changes sync to it automatically.
42+
43+
## Options
44+
45+
The gear icon opens Options:
46+
47+
| Setting | Default | Notes |
48+
|---------|---------|-------|
49+
| SMTP IP | `127.0.0.1` | `Any` accepts mail from other machines |
50+
| SMTP Port | `25` | Any free port works |
51+
| Message folder | per-user app data | Where `.eml` files are written |
52+
| Theme | System | Light / Dark / follow Windows, with accent color options |
53+
| Startup || Start with Windows, start minimized |
54+
55+
## Logs
56+
57+
The **Logs** view shows the live application log — SMTP server start/stop, connections, received messages, and any errors. It's the first place to look when something seems off (see [Troubleshooting](troubleshooting.md)).

docs/docker.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Docker
2+
3+
The Papercut SMTP Service runs as a Linux container — ideal for docker-compose dev environments and CI pipelines.
4+
5+
[![Docker Pulls](https://img.shields.io/docker/pulls/changemakerstudiosus/papercut-smtp?logo=docker)](https://hub.docker.com/r/changemakerstudiosus/papercut-smtp)
6+
7+
## Quick Start
8+
9+
```bash
10+
docker run -d --name papercut \
11+
-p 8080:8080 -p 2525:2525 \
12+
changemakerstudiosus/papercut-smtp:latest
13+
```
14+
15+
- Web UI: **http://localhost:8080**
16+
- Send email to: **localhost:2525**
17+
18+
!!! note "Container ports"
19+
The container uses non-privileged ports by default: SMTP **2525** and HTTP **8080**. Map them however you like — e.g. `-p 25:2525` if your app insists on port 25.
20+
21+
## Docker Compose
22+
23+
```yaml
24+
services:
25+
papercut:
26+
image: changemakerstudiosus/papercut-smtp:latest
27+
ports:
28+
- "8080:8080"
29+
- "2525:2525"
30+
31+
myapp:
32+
build: .
33+
environment:
34+
# inside the compose network, use the service name as SMTP host
35+
Smtp__Host: papercut
36+
Smtp__Port: "2525"
37+
depends_on:
38+
- papercut
39+
```
40+
41+
Other containers on the same network reach Papercut at host **`papercut`**, port **`2525`**.
42+
43+
## Configuration via Environment Variables
44+
45+
Any setting can be overridden with environment variables:
46+
47+
```bash
48+
docker run -d \
49+
-e SmtpServer__Port=2525 \
50+
-e Urls=http://0.0.0.0:8080 \
51+
-e HttpPathPrefix=/webmail \
52+
-p 8080:8080 -p 2525:2525 \
53+
changemakerstudiosus/papercut-smtp:latest
54+
```
55+
56+
For TLS in Docker, see [TLS & Authentication](smtp-tls-auth.md).
57+
58+
## Tags
59+
60+
| Tag | Meaning |
61+
|-----|---------|
62+
| `latest` | Latest stable release |
63+
| `X.Y.Z` / `X.Y` | Specific stable versions |
64+
| `dev` | Latest development build |
65+
66+
## More
67+
68+
Full Docker documentation — volume persistence, Kubernetes examples, and troubleshooting (including volume permission errors) — lives on the [Docker Hub page](https://hub.docker.com/r/changemakerstudiosus/papercut-smtp).
69+
70+
## .NET Aspire
71+
72+
For Aspire projects, skip raw Docker and use the community integration — `CommunityToolkit.Aspire.Hosting.PapercutSmtp`:
73+
74+
```csharp
75+
var papercut = builder.AddPapercutSmtp("papercut");
76+
77+
builder.AddProject<Projects.MyApp>()
78+
.WithReference(papercut)
79+
.WaitFor(papercut);
80+
```
81+
82+
Papercut appears in the Aspire dashboard with auto-assigned ports and a connection string of the form `endpoint=smtp://<host>:<port>`.

0 commit comments

Comments
 (0)