#nodemailer is not working in vercel

1 messages · Page 1 of 1 (latest)

dense cradleBOT
#

Hi @sterile geyser. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, there are a few things you can check to troubleshoot the issue with Nodemailer not working on Vercel:

  1. Environment Variables: Ensure that your environment variables are correctly set up on Vercel. You can configure these in the Project Settings on Vercel. All types of Environment Variables should be configured there, even those used in Development. If you've configured Development Environment Variables, you can pull them into a .env.local for usage on your local machine using the command vercel env pull .env.local (source (https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#environment-variables-on-vercel)).

  2. NEXT_PUBLIC_ Prefix: When deploying your Next.js application to Vercel, your environment variables in .env* files will not be made available to Edge Runtime, unless their names are prefixed with NEXT_PUBLIC_. It's recommended to manage your environment variables in Project Settings instead, from where all environment variables are available (source (https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#environment-variables-on-vercel)).

  3. Third-Party Mail Services: If you're still facing issues, you might want to consider using a third-party mail service like Postmark, Resend, SendGrid, AWS SES, or MailChimp. These services often provide better deliverability and additional features like analytics and scheduling (source (https://vercel.com/guides/sending-emails-from-an-application-on-vercel)).

#

If you're still facing issues after checking these points, it might be helpful to look at the specific error logs or messages you're receiving on Vercel. This could provide more insight into what might be going wrong.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@sterile geyser kapa.ai is still learning and improving, please let us know how it did by reacting below