Coder Social home page Coder Social logo

mini-mail-dev's Introduction

mini-mail-dev

Screenshot

A alternative take on a development testing email server.

Why

Something something reinventing the wheel :^)

But besides the fun of reinventing the wheel I do have some reasons for making this. I used maildev before this and I have some annoyances with it. It's an awesome project and has improved my life, but after using it for many years I have also noticed it's not without its flaws. So here is mini-mail-dev, my take on a mail development server and with fixes for my maildev problems.

Here are things this project aims to improve / do different compared to maildev:

  • Attachments not hidden behind a button
  • By default a fixed max amount of emails and when exceeded old emails are removed. (So you can safely deploy this on a server without much storage or cpu as the server does not have to store a shitload of emails when sending a shitload of emails on a staging server hehe)
  • Different server side language. Mail dev has a tendency to break when running it on a server and sending more than the "average" amound of mails (my experience is at around 5.000 emails). By applying the above and using a language that is better suited for these kinds of things I can deploy this on every potato in the world.

Install

Go Install

(you might not have the latest version if you have installed it earlier)

go install github.com/mjarkk/mini-mail-dev@latest
mini-mail-dev

Git clone & Go install

git clone https://github.com/mjarkk/mini-mail-dev
cd mini-mail-dev
go install
mini-mail-dev

Docker

docker run -it --rm -p 1080:1080 -p 1025:1025 ghcr.io/mjarkk/mini-mail-dev:latest

Docker build

git clone https://github.com/mjarkk/mini-mail-dev
cd mini-mail-dev
docker build -t mini-mail-dev .
docker run -it --rm -p 1080:1080 -p 1025:1025 mini-mail-dev

Usage

mini-mail-dev

Options:

name Flag Envourment variable Default
Disable web --disable-web DISABLE_WEB false
HTTP address --http HTTP_ADDR 0.0.0.0:1080
HTTP password --http-pass HTTP_PASS
HTTP username --http-user HTTP_USER
Max emails --max-emails MAX_EMAILS 200
SMTP address --smtp SMTP_ADDR 0.0.0.0:1025
SMTP domain --smtp-domain SMTP_DOMAIN localhost
SMTP incoming password --smtp-incoming-pass SMTP_INCOMING_PASS
SMTP incoming username --smtp-incoming-user SMTP_INCOMING_USER

Note that authentication is only enabled if you provided the relevant envourment variables

Build & Run

Requirements:

  • Golang v1.21.2 +
  • Nodejs
# Build frontend
npm i
npm run build

# Build backend
go get
go build

Now you can start mini-mail-dev using

./mini-mail-dev

Dev

go run .
# In another terminal tab run:
npm run dev

# For sending a few testing mails to the server run
go run test/test_email.go

The javascript files are hot module reloaded only when going to localhost:3001, the go files are not reloaded on changes made

mini-mail-dev's People

Contributors

demianveenhoven avatar mjarkk avatar qgisk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

qgisk

mini-mail-dev's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.