# Turning on inquiry emails

Right now, when somebody fills in the form on the website it lands in the booking app's **Inbox**
with a red count on the tab. That only helps if somebody opens the app. A Saturday morning
inquiry could sit unseen until Monday, and that is exactly the one you lose to a party hall that
answered in an hour.

This makes the form **email you the moment it is submitted**, with the whole inquiry in the
message and Reply already addressed to the customer.

It is free, it takes about ten minutes, and **I cannot do it for you** — it needs an account,
which needs a password.

---

## Do the email account first

**This will not work until the Weekend Yard inbox exists** (`LAUNCH/EMAIL-ACCOUNT.md`), and it
has to be *that* inbox, for a specific reason explained below. Create the Gmail first, then come
back here.

---

## The one constraint that matters

Resend's free shared sender (`onboarding@resend.dev`) will only deliver **to the email address
that owns the Resend account**. That is not a bug, it is how they stop the shared address being
used for spam.

So: **create the Resend account with the Weekend Yard inbox**, not with a personal address. If
you sign up with your own email, the notifications will only ever reach you, and your mum will
never see one.

The way out of that constraint is a domain of our own (say `theweekendyard.com`, about $12 a
year). With a verified domain, mail can go to anyone — which would also let us send the customer
an automatic "we got it" the second they submit. That is deliberately parked for now.

---

## Steps

1. Go to **resend.com** and sign up with the **Weekend Yard email address**.
2. Verify the address from the email they send.
3. In the dashboard, open **API Keys** → **Create API Key**.
   - Name: `weekend-yard-site`
   - Permission: **Sending access** (not full access — it only needs to send)
   - Domain: leave as all
4. Copy the key. It starts `re_` and **it is shown once** — paste it somewhere safe immediately.
5. Send me the key and I will install it. Or, if you want to do it yourself, from the
   `SITE` folder:

```bash
npx wrangler pages secret put RESEND_API_KEY --project-name the-weekend-yard
```

It will prompt for the value; paste the key and press enter. The key is stored encrypted by
Cloudflare and never appears in the page source or in this folder.

6. Tell me the address the notifications should go to. It goes into `SITE/wrangler.toml` as
   `NOTIFY_TO` and needs one redeploy.

---

## Testing it

Fill in the form on **the-weekend-yard.pages.dev** with your own details and send it. Within a
few seconds you should get an email titled *"New inquiry — …"*.

Then check the booking app's Inbox. The card should be there **without** a red *not emailed*
tag. If you see that tag, the record saved but the mail did not go out — the key is wrong,
missing, or `NOTIFY_TO` is not the address that owns the Resend account.

**The inquiry is never lost either way.** The form stores it first and emails second, on purpose.
A broken mail provider costs you a notification, never a booking.

---

## The limits

The free plan is 3,000 emails a month and 100 a day. At the volume a weekend venue does, that is
not a number you will ever see. If it ever became one, the paid tier is $20/month — but by then
the programme is paying for itself many times over.
