ElyssaW / contact-form-tutorial

46 stars 13 forks source link

Deploy to vercel #1

Open puck3000 opened 3 years ago

puck3000 commented 3 years ago

Hy there

first of all, thank you very much for your perfectly written tutorial on nodemailer and next.js!

I followed along and was able to get everything up and running locally, but when i deployed my project on vercel, my contact form stopped working. To make sure that I didn't add any errors with my own code, I cloned your repo and again: locally everything works as expected, deployed on vercel it stops sending emails. I've set up the password via vercels env ui and the function log seems to show everything as it should:

info  - Loaded env from /var/task/.env
{  
name: 'vercel',  email: 'lsdkfj@lskdf.ch',  message: 'sldkfjlskdfj lskdfj'
} 

any guesses on what might be the culprit?

googling around I found some posts of people complaining that vercel and nodemailer wouldn't go along fine... but I'd like to avoid another service like sendmail for the time being...

any help would be greatly appreciated!

best, daniel

ElyssaW commented 3 years ago

Hey, Daniel!

I actually tried to deploy on Vercel initially and ran into the exact same problem. For me, I just deployed on Heroku instead. So I'm afraid I can't be much help in this regard. But let me know if you get anything!

On Tue, Jun 22, 2021 at 2:01 PM Daniel Lerch @.***> wrote:

Hy there

first of all, thank you very much for your perfectly written tutorial on nodemailer and next.js!

I followed along and was able to get everything up and running locally, but when i deployed my project on vercel, my contact form stopped working. To make sure that I didn't add any errors with my own code, I cloned your repo and again: locally everything works as expected, deployed on vercel it stops sending emails. I've set up the password via vercels env ui and the function log seems to show everything as it should:

info - Loaded env from /var/task/.env { name: 'vercel', email: @.***', message: 'sldkfjlskdfj lskdfj' }

any guesses on what might be the culprit?

googling around I found some posts of people complaining that vercel and nodemailer wouldn't go along fine... but I'd like to avoid another service like sendmail for the time being...

any help would be greatly appreciated!

best, daniel

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ElyssaW/contact-form-tutorial/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGKLBOY6KLDI7ENDOAJ2FLTUDMZPANCNFSM47EI6GDA .

puck3000 commented 3 years ago

Thank you for taking the time to check this! I'll probably try to implement the contact form with sendgrid...

best, daniel

kate-fsd commented 3 years ago

@puck3000 hi! try prefix NEXTPUBLIC for your variable