One container to easy configure a smtp server and to send email with just one command
343
_______. __ __ .___ ___. ___ __ __
/ || | | | | \/ | / \ | | | |
| (----`| |__| | ______| \ / | / ^ \ | | | |
\ \ | __ | |______| |\/| | / /_\ \ | | | |
.----) | | | | | | | | | / _____ \ | | | `----.
|_______/ |__| |__| |__| |__| /__/ \__\ |__| |_______|
This image is based on alpine:3.7 and have install the ssmtp software.
We can use this image in two ways, the first one is the interactive mode or the second one is the single mode for execute just one time this container.
docker run \
-e SMTP_DOMAIN=[gmail.com|zoho.com] \
-e SMTP_URL=[smtp.gmail.com|smtp.zoho.com]:587 \
-e [email protected] \
-e SMTP_PASS=password \
--name sh-mail \
-d sh-mail:latest
docker exec \
-e [email protected] \
-e MAIL_SUBJECT=HELLO \
sh-mail mail
docker exec \
-e [email protected] \
-e MAIL_SUBJECT=HELLO \
-e MAIL_CONTENT=TESTING \
sh-mail mail
docker run --rm \
-e SMTP_DOMAIN=[gmail.com|zoho.com] \
-e SMTP_URL=[smtp.gmail.com|smtp.zoho.com]:587 \
-e [email protected] \
-e SMTP_PASS=password \
-e [email protected] \
-e MAIL_SUBJECT=HELLO \
-e MAIL_CONTENT=TESTING \
sh-mail:latest send
docker run --rm \
-v /home/user/templates-html:/sh-mail/html \
-e SMTP_DOMAIN=[gmail.com|zoho.com] \
-e SMTP_URL=[smtp.gmail.com|smtp.zoho.com]:587 \
-e [email protected] \
-e SMTP_PASS=password \
-e [email protected] \
-e MAIL_SUBJECT=HOLA \
-e MAIL_TEMPLATE=test.html \
sh-mail:latest send
Content type
Image
Digest
Size
2 MB
Last updated
over 8 years ago
docker pull tiogt/sh-mail