mailhook

module
v0.0.0-...-daa6db9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: MIT

README

mailhook is a simple email to webhook server.

Only tested with Discord.

Usage

Defaults to looking for mailhook.yaml in /etc/mailhook.yaml

mailhook

You can specify a `mailhook.yaml`` in the command line.

mailhook -c mailhook.yaml

Configuration

Only a single user/password is supported.

Sample mailhook.yaml:

port: 1025
host: 0.0.0.0
auth:
  username: username
  password: password
hooks:
  - name: One
    address: text@mailhook
    url: https://discord.com/api/webhooks/...
    html_markdown: false
  - name: two
    address: html@mailhook
    url: https://discord.com/api/webhooks/...
    html_markdown: true

If you need to use html emails, set html_markdown: true. Otherwise it will use the text portion of the email.

Building

You need to have go installed. If you don't have it, go to https://golang.org/doc/install

Now, get the mailhook repo.

git clone https://github.com/mrpoundsign/mailhook.git
cd mailhook

Do the go things.

go get

Now build it.

go build -o mailhook cmd/mailhook/main.go

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL