This is a docker container for expose http port for use self smtp service.
Support two ways to transmit configuration parameters, docker env or http request body.
HOSTthe mail server smtp service host, eg: smtp.gmail.comPORTthe mail server smtp service port, eg: 465FROM_EMAILthe sender email address, eg: [email protected]FROM_NAMEthe sender name, eg: Order-NotifyPASSWORDthe sender passwordCONTENT_TYPEthe email content type. eg: text/plain; charset=UTF-8SUBJECTthe email subject. eg: Order Notify
Hostthe mail server smtp service host, eg: smtp.gmail.comPortthe mail server smtp service port, eg: 465FromEmailthe sender email address, eg: [email protected]FromNamethe sender name, eg: Order-NotifyPasswordthe sender passwordContentTypethe email content type. eg: text/plain; charset=UTF-8Subjectthe email subject. eg: Order NotifyToEmailthe receiver email address, eg: [email protected]
docker run -d --restart=unless-stopped --name=smtp-http -p 18081:80 -e HOST=mail.example.com -e PORT=465 xu42/smtp-http# edit the .env file
docker-compose up -dcurl -H 'content-type: application/json' -X POST "http://127.0.0.1:18081/send" -d '{"fromName":"Order Notify","toEmail":"[email protected]","subject":"Order Notify: New Order","body":"this is a test email"}'- https://www.cnblogs.com/aaronhoo/p/16364492.html
- https://cloud.tencent.com/document/product/1288/65752
The MIT License (MIT). Please see License File for more information.