A structure I used to send verification codes after sign-up, via Nodemailer in NextJS.
This repository is just to show the general logic and not intended to be cloned and used.
this is the endpoint called during sign up from the client.
second endpoint to be called after sign up, when the client is invited to check their inbox to enter the verification code.