Next.js Discord

Discord Forum

how to Create API and send Email with Mailgun in App Directory?

Answered
Giant resin bee posted this in #help-forum
Open in Discord
Giant resin beeOP
this image for next 12
how do that in next 13?
Answered by fuma
For App Router, just turn it into a [route handler](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)
And call the endpoint from the client (in a client component)
View full answer

1 Reply

For App Router, just turn it into a [route handler](https://nextjs.org/docs/app/building-your-application/routing/route-handlers)
And call the endpoint from the client (in a client component)
Answer