Next.js Discord

Discord Forum

Sending formData via API and Nodemailer Type Error

Unanswered
Common Redpoll posted this in #help-forum
Open in Discord
Common RedpollOP
I am trying to submit a form via nodemailer.
When I build it, I get the following error:
Type error: Route "app/api/mail/route.tsx" has an invalid "POST" export: Type "{ formData: () => any; }" is not a valid type for the function's first argument.

My API looks like this:
export async function POST(request: { formData: () => any }) {

0 Replies