Next.js Discord

Discord Forum

Advice on sending emails with Next.js/Vercel

Unanswered
Mugger Crocodile posted this in #help-forum
Open in Discord
Mugger CrocodileOP
I have a Webhook built with a Sanity project that triggers when a new Document has been submitted (via a form on my Next.js front-end).

It's my aim to use this webhook to trigger an email to be sent to an email contained in the payload from this webhook.

I have been playing with Resend and React Email all day today (to varying degrees of success), but when it comes to triggering this to be sent I am lost and could use some help getting the ball rolling. Below is the logic I believe I need to employ:

1) Sanity Webhook triggers containing a payload of the latest submission
2) Somewhere is catching his trigger (need to know where/how to set this up)
3) This catch needs to then populate an email and send it to the email address in the payload

0 Replies