Sign inSign up

smoothsystemssolutions/smtp-server-mock

By smoothsystemssolutions

Updated over 7 years ago

Java based smtp email sink for integration and release testing.

Image
0

277

smoothsystemssolutions/smtp-server-mock repository overview

smpt-server-mock

Simple SMTP Server Mock using Apache James (Netty) and Spring Boot for testing purposes.

Run

mvn spring-boot:run

The default port to whom the smtp sink is listening is 10025. No authentication is enabled to simplify the testing.

To retrieve a basic set of emails information sent to the smtp sink you can use the REST interface:

# Retrieves alle emails sent to the sink
GET http://localhost:8010/email-details/smtp-to/[email protected]

# Retrieves alle emails sent to the sink
GET http://localhost:8010/email-details/mail-id/{message-id}

# Retrieves alle emails sent to the sink
GET http://localhost:8010/email-details/smtp-sender/{smtp-sender}

# Retrieves alle emails sent to the sink
GET http://localhost:8010/email-details/smtp-to/{smtp-recipient}

Build and run docker image

Build a docker container with name smtp-sink and run it the first time:

mvn clean package
docker build . -t smooth-systems-solutions/smtp-sink
docker run -d -p 1025:10025 -p 8010:8010 --name smtp-sink smooth-systems-solutions/smtp-sink

Start docker container:

docker start smtp-sink

Stop and cleanup container:

docker stop smtp-sink

Connect to console:

docker exec -it smtp-sink /bin/ash

Remove container:

docker rm smtp-sink

Github

Also see latest version on: https://github.com/Smooth-Systems/smtp-server-mock

Tag summary

Content type

Image

Digest

Size

93 MB

Last updated

over 7 years ago

docker pull smoothsystemssolutions/smtp-server-mock