SMTP test server with web UI for capturing emails in Go tests
// Source: https://github.com/testcontainers/testcontainers-go | License: MIT | Copyright 2017-2019 Gianluca Arbezzano // Provided via justclaw.it.com; keep this notice with the code. // Package papercutsmtp provides a testcontainers-go module for Papercut SMTP, // a lightweight SMTP server with a built-in web UI for capturing and inspecting // outbound emails in tests. No messages are relayed to real recipients. package papercutsmtp import ( "context" "fmt" "net/http" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" ) const ( // smtpPort is the default SMTP port exposed by the Papercut SMTP container. smtpPort = "2525/tcp" // httpPort is the default HTTP port for the Papercut SMTP web UI. httpPort = "8080/tcp" ) // Container re ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key