## TL;DR
Resend requires the sending domain to be verified; a from address on a different domain returns 422. Add and verify the domain (or use Resend's test address only for testing), then align the from field.

```text
resend 422 invalid from address domain mismatch
```

## Use this when
- Resend API returns 422 invalid from address.
- Domain mismatch appears in the error detail.
- Sends worked in test but fail from production code.

## Not for this skill when
- 401 invalid API key errors.
- Emails accepted but bouncing at recipients.
- Attachment size rejections, which return a different 422 detail.

## Steps
1. Read the error detail to confirm the from domain is the problem. Verify: the message names the from address or its domain.
2. In the Resend dashboard, check whether that domain is added and verified. Verify: the domain shows a verified status with DNS records green.
3. If not verified, add the domain and publish the DKIM and SPF records Resend provides. Verify: DNS propagation completes and the dashboard marks it verified.
4. Change the from field to an address on the verified domain. Verify: a test send returns 200 and an email ID.
5. Remove any hardcoded test from addresses from production config. Verify: a search over config finds no references to the test domain.

## Variant phrasings
### resend invalid from address 422
Common phrasing of the error.
### resend domain not verified sending error
The root-cause search.
### resend from address must match verified domain
The rule phrasing.

Compatibility: Resend REST API and SMTP; applies to all plans on production domains.

## Why it happens
Resend enforces domain verification to stop spoofing: the API will not send from a domain it cannot authenticate. The mismatch usually comes from copy-pasted code that still points at the test domain or a teammate's domain.

## Edge cases / pitfalls
- Subdomains count as different domains; a mail subdomain needs its own verification.
- DNS changes can take an hour to propagate; the dashboard sometimes shows green early.
- Reply-to can be anything, but from must be verified; do not confuse the two.
- Rotating the API key does nothing for a 422; do not waste time there.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_53Xg3Cd1iM9lU-BC_MuVJQ
