alash3al / smtp2http

A tiny software that receive a smtp request (email) and send it to the specified webhook as a http post request
Apache License 2.0
522 stars 81 forks source link
go golang mail mailbox smtp-server smtp2http webhook

SMTP2HTTP (email-to-web)

smtp2http is a simple smtp server that resends the incoming email to the configured web endpoint (webhook) as a basic http post request.

Dev

Dev with Docker

Locally :

Or build it as it comes from the repo :

The timeout options are of course optional but make it easier to test in local with telnet localhost 25 Here is a telnet example payload :

HELO zeus
# smtp answer

MAIL FROM:<email@from.com>
# smtp answer

RCPT TO:<youremail@example.com>
# smtp answer

DATA
your mail content
.

Docker (production)

Docker images arn't available online for now See "Dev with Docker" above

Native usage

smtp2http --listen=:25 --webhook=http://localhost:8080/api/smtp-hook smtp2http --help

Contribution

Original repo from @alash3al Thanks to @aranajuan