Building from source
Mailpit’s source code can be downloaded from https://github.com/axllent/mailpit.
Go (>= version 1.24) and npm are required to compile Mailpit.
git clone git@github.com:axllent/mailpit.git
cd mailpit
Building the UI
The Mailpit web user interface is built with Node.js.
In the project’s root (top) directory, run the following to install the required node modules:
Installing the node modules
Building the web UI
You can also run npm run watch, which will watch for changes and rebuild the HTML/CSS/JS automatically when changes are detected.
Please note that you must restart Mailpit (go run .) and refresh your browser to load the changes.
Build the Mailpit binary
Once you have the assets compiled, you can build Mailpit as follows:
go build -ldflags "-s -w"
Building a stand-alone sendmail binary
If you do not intend to either symlink sendmail to mailpit or configure your existing sendmail to route mail to
Mailpit (see instructions), you can optionally build a stand-alone sendmail binary.
Please note that this is not intended for use with anything other than Mailpit.
cd sendmail
go build -ldflags "-s -w"
Edit this page