Map your app’s mail settings
Add these mappings to your existingx-zenith.env. Replace the names on the left with the settings your app reads.
In each services list, include every service that sends mail. For example, use [app, worker] if both services send messages.
Configure the SMTP connection
Use SMTP authentication and STARTTLS on port587. Set your app’s TLS option according to its configuration format. Port 587 uses STARTTLS rather than an implicit TLS connection.
Use the supplied sender address and display name. The relay rewrites sender identity to identify the originating deployment. A custom domain does not give your app an arbitrary email sender address.
Keep credentials on the app server. Use aliases so your app receives the current values on each render. Do not copy credentials into source files, browser bundles, or static config content.
Check that mail works
Trigger a real app action such as a password reset. Confirm that the app queues or sends the message and that it reaches a mailbox you control. If a worker sends mail, check that it receives the same mappings as the web service. If mail does not arrive, check that the app enables its SMTP mailer and uses authentication, STARTTLS, and the supplied sender address. Confirm that the service that sends mail receives the credentials. Do not log passwords or connection strings that contain credentials. See the SMTP built-ins for connection values. If your app requires a mailer connection string, useurlencode on each credential component.