WithOutboundSMTP wires an upstream relay for /send + HITL approve paths so they don't error with "outbound SMTP relay not configured". Tests that don't trigger outbound omit this. Pointing at Mailpit on localhost:1025 (started via `make docker-up`) is the typical pattern.
(host string, port int, fromDomain string)
| 46 | // Tests that don't trigger outbound omit this. Pointing at Mailpit on |
| 47 | // localhost:1025 (started via `make docker-up`) is the typical pattern. |
| 48 | func WithOutboundSMTP(host string, port int, fromDomain string) TestServerOption { |
| 49 | return func(o *testServerOpts) { |
| 50 | o.outboundSMTPHost = host |
| 51 | o.outboundSMTPPort = port |
| 52 | o.outboundSMTPFromDomain = fromDomain |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | type E2ATestServer struct { |
| 57 | HTTPServer *httptest.Server |
no outgoing calls