I am facing a puzzling issue with my Next.js application. Despite successfully using Nodemailer locally to submit forms, I keep encountering an "Internal Server Error" when deploying to cPanel. I have tried different solutions, but the problem persists. As a newcomer to Next.js, finding relevant resources has been challenging.
The exact error message reads:
POST https://mydomain/api/sendContact 500 (Internal Server Error)
I am seeking guidance on troubleshooting and fixing this mysterious issue. Any help or suggestions would be greatly appreciated.