feat(emailing-domain): add LOG driver for local development (#21286)

## What

Adds a `LOG` driver to the emailing-domain feature, selected via a new
`EMAILING_DOMAIN_DRIVER` config variable (defaults to `AWS_SES`, so
production behavior is unchanged).

The LOG driver:
- resolves domains to `VERIFIED` instantly (no DNS / SES setup)
- logs each `sendEmail` and returns a synthetic `messageId` instead of
calling SES

It also dev-seeds a pre-verified domain per workspace
(`<workspaceId>.dev.twenty.local`) so the feature works out of the box.

## Why

The emailing-domain feature currently ships only the AWS SES driver, so
the verify → send flow can't be exercised locally (or in CI) without
real AWS credentials. This unblocks local development and review of
anything built on emailing domains.

## Usage

```
EMAILING_DOMAIN_DRIVER=LOG
```

The seeded `*.dev.twenty.local` domain is already verified; sends are
logged (`[log-driver] sendEmail ...`).

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
This commit is contained in:
Félix Malfait
2026-06-08 14:59:11 +02:00
committed by GitHub
parent b1b030c894
commit dfb3da1f8d
22 changed files with 724 additions and 608 deletions
@@ -1,14 +1,10 @@
import { gql } from '@apollo/client';
export const CREATE_EMAILING_DOMAIN = gql`
mutation CreateEmailingDomain(
$domain: String!
$driver: EmailingDomainDriver!
) {
createEmailingDomain(domain: $domain, driver: $driver) {
mutation CreateEmailingDomain($domain: String!) {
createEmailingDomain(domain: $domain) {
id
domain
driver
status
verifiedAt
verificationRecords {
@@ -5,7 +5,6 @@ export const VERIFY_EMAILING_DOMAIN = gql`
verifyEmailingDomain(id: $id) {
id
domain
driver
status
verifiedAt
createdAt
@@ -5,7 +5,6 @@ export const GET_ALL_EMAILING_DOMAINS = gql`
getEmailingDomains {
id
domain
driver
status
verifiedAt
verificationRecords {