Transports
Mailpit / Dev Capture
- Enable Mailpit / Dev Capture in Transports.
- Set the host and port. For local DDEV this is usually
127.0.0.1and1025. - Use this for local testing when you want to capture mail without delivering it to real recipients.
Generic SMTP
- Enter the SMTP host, port, encryption, username, and password provided by the mailbox host.
- Set Default From Email to the authenticated mailbox or an address that provider explicitly allows that mailbox to send as.
- Use port
587with TLS or port465with SSL depending on the provider instructions. - If the provider says the sender is not owned by the user, the From address does not match the authenticated SMTP account or an approved alias.
Microsoft 365 Graph
- In Azure, create an app registration for Mailroom.
- Add Microsoft Graph application permission
Mail.Send. - Grant admin consent for the tenant.
- Create a client secret.
- In Mailroom, enter Tenant ID, Client ID, Client Secret, and Sender Mailbox.
- The sender mailbox must exist and be allowed by the tenant policies. The test button sends through Graph
/users/{sender}/sendMail.
Google Gmail API
Google's setup is the long hallway with every door labeled "almost done." The working Mailroom path is Google Workspace service account authentication with domain-wide delegation.
- Open Google Cloud Console and create or select a project for Mailroom.
- Enable the Gmail API for that project.
- Create a service account, such as
Mailroom Sender. - Open the service account details and enable Domain-wide Delegation.
- Copy the service account Client ID. This is the long numeric ID, not the service account email.
- Open Google Workspace Admin Console as a super admin.
- Go to Security, Access and data control, API controls, Domain-wide delegation.
- Add a new domain-wide delegation entry using the numeric Client ID.
- Use this exact OAuth scope:
https://www.googleapis.com/auth/gmail.send. - Back in Google Cloud, open the service account Keys tab and create a JSON key.
- In Mailroom, Service Account Email is the JSON
client_emailvalue. - In Mailroom, Service Account Private Key is the JSON
private_keyvalue, includingBEGIN PRIVATE KEYandEND PRIVATE KEY. - In Mailroom, Delegated Sender Mailbox is the real Google Workspace mailbox to send as, such as
me@example.com.