Sign inSign up

jsakamoto/smtpserver-for-e2etest

By jsakamoto

•Updated almost 9 years ago

Fake SMTP server for E2E Test with builtin HTTP Web API end point and Web UI.

Image
1

229

jsakamoto/smtpserver-for-e2etest repository overview

⁠Whatt's this?

This is a fake SMTP server with builtin HTTP Web API end point and Web UI.

  • This is a fake server, so received all messages are not delivered to any other outside. There are stocked inside this fake server.
  • Accept any addresses. There is no need to prepare mailbox setup.
  • You can get and delete messages that are stocked in this fake server via HTTP Web API end point with JSON format.
  • Builtin Web UI.

⁠How to use?

At first, pull docker image,

docker pull jsakamoto/smtpserver-for-e2etest:beta3

 
and run it as a docker container with port forwarding.

(The container listen TCP/80 port to expose HTTP Web API end point, and also listen TCP/25 port to expose SMTP end point.)

docker run -p 8025:80 -p 587:25 -d jsakamoto/smtpserver-for-e2etest:beta3

 
Then you can open Web UI at the URL http://localhost:8025 with any web browser.

screen shot

When you send a e-mail to localhost:587 via SMTP, you will see the mail message that you sent in Web UI immediately.

You can also get API document via "API Document" link.

Screen shot of API Doccument page

You can get all stocked messages by cURL command with simple format.

curl -X GET "http://localhost:8025/api/mails/simple"

 
You can also delete all stocked message by cURL command.

curl -X DELETE "http://localhost:8025/api/mails/simple"

Project site: https://github.com/jsakamoto/smtp-server-4devtest/commits/port/netcore⁠

Tag summary

Content type

Image

Digest

Size

117.8 MB

Last updated

almost 9 years ago

docker pull jsakamoto/smtpserver-for-e2etest:beta3