Skip to content

32ba/smtp2discord

Repository files navigation

smtp2discord

This is a simple SMTP server that forwards emails to a Discord channel using a webhook.

Features

  • Forward emails to a Discord channel
  • Support encoded email subjects
  • Support encoded email body

Usage

You should set the following environment variables:

  • WEBHOOK_URL: The URL of the Discord webhook to use.
  • PORT: The port to listen on. Defaults to 2525.

Docker

You can pull the image from the GitHub Container Registry:

linux/amd64 and linux/arm64 images are available.

$ docker pull ghcr.io/32ba/smtp2discord:latest
$ docker run -p 2525:2525 -e WEBHOOK_URL=https://discordapp.com/api/webhooks/... -e PORT=2525 smtp2discord 

or build the image yourself:

$ docker build -t smtp2discord .
$ docker run -p 2525:2525 -e WEBHOOK_URL=https://discordapp.com/api/webhooks/... -e PORT=2525 smtp2discord 

Dev

Local development requires Go 1.16 or later.

$ go mod download
$ go build -o smtp2discord .

License

This project is licensed under the MIT License - see the LICENSE file for details.