| Crates.io | mailboar |
| lib.rs | mailboar |
| version | 0.4.4 |
| created_at | 2022-01-14 07:40:53.280774+00 |
| updated_at | 2025-01-05 14:52:50.02579+00 |
| description | A web interface for Tiny MailCatcher, a MailCatcher clone |
| homepage | https://github.com/aeyoll/mailboar |
| repository | https://github.com/aeyoll/mailboar |
| max_upload_size | |
| id | 513758 |
| size | 82,919 |
Mailboar is an email test server written in Rust.
In the backend, it uses a fork of Tiny MailCatcher, rewritten with the Axum framework, to provide extra features.
The REST API is the same as the one of MailCatcher and Tiny MailCatcher:
GET/DELETE http://localhost:1080/messages endpoint returns/delete all messages in the repository.GET http://localhost:1080/messages/:id.json endpoint returns a single message in JSON format.GET http://localhost:1080/messages/:id.source endpoint returns the message source.GET http://localhost:1080/messages/:id.html endpoint returns the HTML version of this message.GET http://localhost:1080/messages/:id.eml endpoint returns the EML version of this message.GET http://localhost:1080/messages/:id.plain endpoint returns the text/plain version of this message.DELETE http://localhost:1080/messages/:id endpoint deletes a message.GET http://localhost:1080/messages/:id/parts/:cid endpoint returns attachments by content ID.In addition, the following endpoints are available:
POST http://localhost:1080/messages/:id/send endpoint sends a message to the specified address.GET http://localhost:1080/events endpoint returns SSE events.First, install mailboar using Cargo:
cargo install mailboar
Then, clone this repository, and build the static assets using https://pnpm.io/. Node >= 20 is required.
cd crates/frontend
pnpm i # Install dependencies
pnpm run build # Build static assets
This will create a static repository with all the assets.
Finally, launch mailboar from the cloned repository:
mailboar --ip 127.0.0.1 --smtp-port=1025 --api-port=1080 --http-port=8025 --assets-path=crates/frontend/static # default values
To be able to send emails to a specific address, you need to configure the SMTP server to use. The following environment variables can be used to do so:
MAILBOAR_SMTP_DSN: The DSN of the SMTP server to use. Defaults to smtp://127.0.0.1:25.MAILBOAR_SMTP_FROM: The email address to use as the sender. Defaults to mailboar@localhost.The MAILBOAR_SMTP_DSN can be configured in multiple ways. Go to lettre documentation to see all the possible configurations.
There is also a small Docker image available, with all batteries included:
docker run --rm --init -t -p 1080:1080 -p 1025:1025 -p 8025:8025 aeyoll/mailboar:latest
For easier development, use https://github.com/watchexec/cargo-watch to auto-compile on change:
cargo watch -x 'run'
Auto-compile static assets:
yarn run start
1.71.0+