Skip to content
mailroom

Transports

Mailpit / Dev Capture

  1. Enable Mailpit / Dev Capture in Transports.
  2. Set the host and port. For local DDEV this is usually 127.0.0.1 and 1025.
  3. Use this for local testing when you want to capture mail without delivering it to real recipients.

Generic SMTP

  1. Enter the SMTP host, port, encryption, username, and password provided by the mailbox host.
  2. Set Default From Email to the authenticated mailbox or an address that provider explicitly allows that mailbox to send as.
  3. Use port 587 with TLS or port 465 with SSL depending on the provider instructions.
  4. 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

  1. In Azure, create an app registration for Mailroom.
  2. Add Microsoft Graph application permission Mail.Send.
  3. Grant admin consent for the tenant.
  4. Create a client secret.
  5. In Mailroom, enter Tenant ID, Client ID, Client Secret, and Sender Mailbox.
  6. 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.

  1. Open Google Cloud Console and create or select a project for Mailroom.
  2. Enable the Gmail API for that project.
  3. Create a service account, such as Mailroom Sender.
  4. Open the service account details and enable Domain-wide Delegation.
  5. Copy the service account Client ID. This is the long numeric ID, not the service account email.
  6. Open Google Workspace Admin Console as a super admin.
  7. Go to Security, Access and data control, API controls, Domain-wide delegation.
  8. Add a new domain-wide delegation entry using the numeric Client ID.
  9. Use this exact OAuth scope: https://www.googleapis.com/auth/gmail.send.
  10. Back in Google Cloud, open the service account Keys tab and create a JSON key.
  11. In Mailroom, Service Account Email is the JSON client_email value.
  12. In Mailroom, Service Account Private Key is the JSON private_key value, including BEGIN PRIVATE KEY and END PRIVATE KEY.
  13. In Mailroom, Delegated Sender Mailbox is the real Google Workspace mailbox to send as, such as me@example.com.