SMTP server to receive emails and serve them over http, github.com/poornatc/smtp2http.
1.0K
SMTP server to receive emails and serve them over http. smtp2http is intended to be used as a mail server for receiving OTP emails that can be retrieved for Playwright automation.
Eg. receive email for [email protected] and retreive it as http://localhost/mail/`[email protected]`.
docker run -v $PWD/server.key:/server.key \
-v $PWD/server.pem:/server.pem \
-p 25:1025 -p 80:8080 \
rsubr/smtp2http
# if using docker buildx
buildx build --load . -t smtp2http
# if using vanilla docker build
docker build . -t smtp2http
#!/bin/bash
netcat -i 1 -C localhost 1025 <<EOT
EHLO localhost
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
Hello world!
.
EOT
wget -O - -S -q 'http://localhost:8080/mail/[email protected]'
Content type
Image
Digest
sha256:2b261dc52…
Size
5.8 MB
Last updated
12 months ago
docker pull rsubr/smtp2http