@nymbalhq/email-resend
v1.6.0
Published
Resend email for Nymbal: the `resend` email provider (SMTP relay, bounce and complaint webhooks)
Readme
@nymbalhq/email-resend
The resend email provider for Nymbal. It sends every transactional mail over Resend's SMTP relay, and takes
Resend's bounce and complaint webhooks, so a permanent bounce or a spam complaint stops alert mail to that address.
npm install @nymbalhq/email-resend nodemailer// nymbal.config.ts
commerce: {
email: {
provider: 'resend',
config: {
from: '[email protected]', // an address on a domain verified in Resend
smtp: { pass: env('RESEND_API_KEY') },
webhookSecret: env('RESEND_WEBHOOK_SECRET'),
},
},
}smtp.hostdefaults tosmtp.resend.com,smtp.portto 587 (STARTTLS) andsmtp.usertoresend. For implicit TLS setport: 465, secure: true.smtp.passis a Resend API key with sending access.smtp.passandwebhookSecretmay be left out of the config and saved in the admin's Settings instead.webhookSecretis the webhook's signing secret (whsec_…, Resend: Webhooks, the endpoint). Without it the store refuses every webhook post and the email slot's health isdegraded.
Webhooks
In Resend, add a webhook endpoint at <api origin>/api/webhooks/resend subscribed to:
email.bouncedemail.complained
A Permanent bounce is recorded as a hard bounce (resend.bounced.v1) and a complaint as resend.complained.v1,
one per recipient; both stop alert mail to the address. A Transient or Undetermined bounce is soft and stops
nothing. Any other event posted to the same URL is answered 200 and ignored.
Only a post whose Svix signature matches the secret, with a timestamp within five minutes of the server's clock, is
accepted. Resend's retry of a post keeps its svix-id, and the store records each id once.
