> ## Documentation Index
> Fetch the complete documentation index at: https://helloluciallc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email Services

<Note>
  Lucia uses separate email services for distinct jobs: Postmark for inbound operational/system email intake, and Resend for outbound waitlist and guest verification emails.
</Note>

***

## Current Service Roles

| Service  | Role                                    | Status                                 |
| -------- | --------------------------------------- | -------------------------------------- |
| Postmark | Inbound operational/system email intake | Active / existing infrastructure       |
| Resend   | Outbound waitlist welcome email         | Implemented / configured / tested live |
| Resend   | Guest booking verification email        | Implemented in live-development        |

***

## Postmark

Postmark remains responsible for inbound email surfaces such as:

```text theme={"dark"}
property/operator email intake
maintenance / operations email intake
system email parsing paths
```

Current Canon status:

```text theme={"dark"}
Postmark inbound body: working
Postmark attachment metadata: working
Postmark API attachment retrieval: deferred
```

Postmark is not the waitlist outbound provider.

***

## Resend

Resend is responsible for Lucia outbound product emails currently recorded in Canon:

```text theme={"dark"}
waitlist welcome email
waitlist confirmation behavior
founder-style launch updates for now
guest booking verification email
```

Current implementation status:

```text theme={"dark"}
waitlist selected: yes
waitlist configured: yes
waitlist implemented: yes
waitlist tested: yes
guest verification implemented: yes, live-development
```

Live proof:

```text theme={"dark"}
Resend domain: send.hellolucia.ai verified
Cloudflare Pages env vars: configured
Waitlist function: wired
New signup live test: passed
Duplicate signup live test: passed with no resend
```

***

## Sending Domain

Current verified Resend sending domain:

```text theme={"dark"}
send.hellolucia.ai
```

Current sender identity:

```text theme={"dark"}
From: Lucia from HelloLucia.ai <hello@send.hellolucia.ai>
Reply-to: hello@hellolucia.ai
```

Resend receiving is not enabled and is not required for this path.

***

## Guest Verification Email

Current guest verification email behavior:

```text theme={"dark"}
provider: Resend
purpose: booking-link verification for guest-facing Lucia
destination: booking email already on file
guest-entered email: never trusted as destination
design: matches HelloLucia.ai waitlist email design
```

The verification email must not expose:

```text theme={"dark"}
booking ID
booking email
payment details
stay dates
private booking details
```

The guest-facing chat must not expose the token, magic URL, destination email, or private booking details.

See [04 - Guest Verification Email](/lucia/guest-facing-lucia/guest-verification-email) for the full privacy contract.

***

## Runtime Implementation

Current waitlist runtime owner:

```text theme={"dark"}
repo: hello-lucia/lucia-marketing
branch: main
runtime: Cloudflare Pages Function
file: functions/api/waitlist.js
route: POST /api/waitlist
```

Current behavior:

<div className="hl-flow-v"><span>visitor submits waitlist form</span><span>Cloudflare Pages Function validates email server-side</span><span>signup is inserted into Supabase table lucia\_waitlist\_signups</span><span>if insert is new, Resend welcome email is sent</span><span>if insert is duplicate, signup returns ok:true duplicate:true and no email is resent</span><span>if Resend send fails after storage succeeds, signup remains saved and response reports welcome\_email.sent:false</span></div>

Storage remains the source of truth. Email delivery must not control whether the waitlist signup succeeds once storage has accepted the record.

***

## Environment Variables

Current Cloudflare Pages environment variables:

```text theme={"dark"}
SUPABASE_URL
SUPABASE_SERVICE_ROLE_KEY
RESEND_API_KEY
RESEND_WAITLIST_FROM
RESEND_WAITLIST_REPLY_TO
RESEND_WAITLIST_AVATAR_URL
```

Current values by role:

```text theme={"dark"}
RESEND_WAITLIST_FROM = Lucia from HelloLucia.ai <hello@send.hellolucia.ai>
RESEND_WAITLIST_REPLY_TO = hello@hellolucia.ai
RESEND_WAITLIST_AVATAR_URL = https://hellolucia.ai/lucia-avatar-golden-border.png
```

Secrets must remain server-side only.

***

## Current Known Gap

The endpoint currently returns the Resend message id in the JSON response after a successful send, but it does not yet persist the Resend message id or welcome-email status back into Supabase.

Current truth:

```text theme={"dark"}
Resend send path: implemented
Live email delivery: tested
Duplicate no-resend behavior: tested
Message id persistence: not yet implemented
Send status persistence: not yet implemented
```

This is acceptable for the current waitlist milestone. Add persistence later if/when auditability becomes necessary.

***

## Implementation Status Checklist

* [x] Resend domain configured
* [x] Resend domain verified
* [x] Sender identity approved
* [x] Environment variables added to Cloudflare Pages runtime
* [x] Waitlist signup record storage implemented
* [x] Resend send path implemented
* [x] Success path tested live
* [x] Duplicate path tested live
* [x] Duplicate signup does not resend email
* [x] Canon current-state docs updated after proof
* [ ] Resend message id persisted to Supabase
* [ ] Send status persisted to Supabase

***

## See Also

* [Resend Waitlist Outbound Email](/lucia/decisions/resend-waitlist-outbound-email)
* [Waitlist Welcome Email](/lucia/marketing/waitlist-welcome-email)
* [04 - Guest Verification Email](/lucia/guest-facing-lucia/guest-verification-email)
* [02 - Current System State](/lucia/start-here-lucia-ai/current-system-state)
* [00 - START HERE - Infrastructure](/lucia/infrastructure/start-here-infrastructure)
* [02 - Cloudflare](/lucia/infrastructure/cloudflare)
* [03 - Supabase](/lucia/infrastructure/supabase)
