@beignet/provider-mail-resend 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -39,6 +39,10 @@ Required environment variables:
|
|
|
39
39
|
| `RESEND_API_KEY` | Resend API key |
|
|
40
40
|
| `RESEND_FROM` | Default sender, e.g. `My App <no-reply@example.com>` |
|
|
41
41
|
|
|
42
|
+
`beignet doctor --strict` checks that installed Resend mail providers are
|
|
43
|
+
registered in `server/providers.ts` and that both required env vars are present
|
|
44
|
+
in app env examples or config.
|
|
45
|
+
|
|
42
46
|
## Use in application code
|
|
43
47
|
|
|
44
48
|
```typescript
|
|
@@ -82,6 +86,11 @@ await ctx.ports.resend.client.emails.send({
|
|
|
82
86
|
});
|
|
83
87
|
```
|
|
84
88
|
|
|
89
|
+
The provider contributes:
|
|
90
|
+
|
|
91
|
+
- `ctx.ports.mailer`, the standard Beignet `MailerPort`
|
|
92
|
+
- `ctx.ports.resend`, an escape hatch with the Resend client and default sender
|
|
93
|
+
|
|
85
94
|
## Devtools
|
|
86
95
|
|
|
87
96
|
When `ctx.ports.devtools` is installed, this provider records `mail.send`,
|
|
@@ -92,6 +101,18 @@ When `ctx.ports.devtools` is installed, this provider records `mail.send`,
|
|
|
92
101
|
Delivery failures throw `MailDeliveryError` from `@beignet/core/mail`.
|
|
93
102
|
Startup configuration problems throw during provider setup.
|
|
94
103
|
|
|
104
|
+
## Local and tests
|
|
105
|
+
|
|
106
|
+
Use a memory or fake `MailerPort` in use-case tests. Keep Resend sandbox or
|
|
107
|
+
test-mode credentials in environment-specific config and avoid sending real
|
|
108
|
+
mail from automated tests.
|
|
109
|
+
|
|
110
|
+
## Deployment notes
|
|
111
|
+
|
|
112
|
+
Set `RESEND_FROM` to a verified domain sender. Treat mail delivery as an
|
|
113
|
+
external side effect: trigger important mail from committed workflow state,
|
|
114
|
+
usually through notifications, jobs, or outbox-backed listeners.
|
|
115
|
+
|
|
95
116
|
## License
|
|
96
117
|
|
|
97
118
|
MIT
|