If both forms in my Next.js application are functioning properly with Nodemailer locally, but upon deployment to cPanel, I encounter an "Internal Server Error" when attempting to submit the forms, how can I resolve this issue? Despite attempting various solutions, the problem persists. As a newcomer to Next.js, I'm struggling to find helpful resources.
The error message I receive is:
POST https://mydomain/api/sendContact 500 (Internal Server Error)
Could someone provide guidance on how to troubleshoot and fix this issue? Any insights or suggestions would be greatly appreciated.