Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.5 KB

File metadata and controls

57 lines (47 loc) · 1.5 KB

embedded-mailhog

Maven dependency

pom.xml
<dependency>
    <groupId>com.playtika.testcontainers</groupId>
    <artifactId>embedded-mailhog</artifactId>
    <scope>test</scope>
</dependency>

Consumes (via bootstrap.properties)

  • embedded.mailhog.enabled (true|false, default is true)

  • embedded.mailhog.reuseContainer (true|false, default is false)

  • embedded.mailhog.dockerImage (default is 'mailhog/mailhog:v1.0.1')

  • embedded.mailhog.waitTimeoutInSeconds (default is 60 seconds)

  • embedded.mailhog.smtp-port (default is 1025)

  • embedded.mailhog.http-port (default is 8025)

  • embedded.toxiproxy.proxies.mailhog.enabled Enables both creation of the container with ToxiProxy TCP proxy and a proxy to the embedded-mailhog container SMTP port.

Produces

  • embedded.mailhog.host

  • embedded.mailhog.smtp-port

  • embedded.mailhog.http-port

  • embedded.mailhog.toxiproxy.host

  • embedded.mailhog.toxiproxy.port

  • embedded.mailhog.networkAlias

  • embedded.mailhog.internalSmtpPort

  • embedded.mailhog.internalHttpPort

  • Bean ToxiproxyContainer.ContainerProxy mailhogSmtpContainerProxy

Example (Spring Boot)

bootstrap-test.yml

embedded:
  mailhog:
    enabled: true
    docker-image: 'mailhog/mailhog:v1.0.1'

application-test.yml

spring:
  mail:
    host: ${embedded.mailhog.host}
    port: ${embedded.mailhog.smtp-port}