How to Send Emails with Next JS and Nodemailer

How to Send Emails with Next JS and Nodemailer

Nikita Dev

1 год назад

70,636 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Abhinav Kumar
Abhinav Kumar - 28.09.2023 14:34

Just Awesome

Ответить
Seto Seng
Seto Seng - 28.09.2023 00:29

Great explanation! Straight to the point.

Ответить
kennedy freitas
kennedy freitas - 12.09.2023 19:26

awesome job but, thanks a lot

Ответить
Soham Bhikadiya
Soham Bhikadiya - 28.08.2023 09:06

I don't want to let user type email, I want to get their email automatically and then send mail by that email, so user get scared from spamming mail
bcz I am using this form for my own portfolio website but user may spam mail me as its not his/her mail

Ответить
Ahmed Hassaballa
Ahmed Hassaballa - 25.08.2023 01:49

Thanks for your great explanation, i would like to ask can i adapt this approach in my project for sending email notification within my workplace for workflow tasks such as approval email notifications when a new request has created by employees ? regards

Ответить
Richard Brooks
Richard Brooks - 21.08.2023 02:24

This is not working on nextjs 13. latest version. Please help

Ответить
Sayak Basak
Sayak Basak - 31.07.2023 10:12

it's not working in production

Ответить
Mohammad basit Yousofi
Mohammad basit Yousofi - 25.07.2023 15:18

Hey!
Error: fs not found from node_modules folder of node mailer
tell me the sulotion

Ответить
keyon lewis
keyon lewis - 13.07.2023 04:58

it was fun making this work on next.js 13, lot of new things i learn within 2 hour it take for me to finish it. thanks bro

Ответить
Oleksandr Lutsiuk
Oleksandr Lutsiuk - 07.07.2023 11:06

thanks a lot:)

Ответить
GOJA MOJA
GOJA MOJA - 05.07.2023 21:59

thanks man

Ответить
Subei
Subei - 05.07.2023 07:21

Why is nodemailer not sending the email when deploying on Vercel?

Ответить
Sayak Basak
Sayak Basak - 27.06.2023 23:13

great

Ответить
Goga Imerlishvili
Goga Imerlishvili - 26.06.2023 14:03

Bravo!

Ответить
Lipo Codes
Lipo Codes - 15.06.2023 16:52

Very good

Ответить
Score
Score - 08.06.2023 21:41

everything works perfectly fine, just a question, is this api/contact public for everyone when we host it? Is there a risk of this data being leaked?

Ответить
Manish Chaurasia
Manish Chaurasia - 06.06.2023 13:09

Dude you're great. This helped me a lot❤❤❤❤

Ответить
Mike Gyamfi
Mike Gyamfi - 28.05.2023 03:03

It sends message undefined undefined to my gmail..how do I fix this?

Ответить
Min
Min - 27.05.2023 06:20

Thank you so much for sharing your experience, Sir.

Ответить
John Michael Cañero
John Michael Cañero - 25.05.2023 05:05

Thank you! It worked but HOW do you set up where the sender displays their name in the email and not the "Me" Email?

Ответить
Max Skewes
Max Skewes - 23.05.2023 00:34

Thank you, any possibility of a follow up to this video, migrating to the Nextjs 13 App directory? I am having an absolutely impossible time trying to implement the teachings of this video to their new system of API usage. Much, much appreciated.

Ответить
georgeta deder
georgeta deder - 18.05.2023 23:14

for me, it doesn't work and I don't know why. l receive the message " Failed to send message" also I receive the next Error: Missing credentials for "PLAIN"

Ответить
Hollow Frames
Hollow Frames - 16.05.2023 04:34

Awesome video, my guy. You the man!!!! Keep em coming

Ответить
SCORIA
SCORIA - 30.04.2023 08:07

Hi Onelight! I like your solution since I was trying to get a functionality like this using services like sendgrid but all of these require you to have a private email domain which I can't affort right now.

But I do have a question, I implemented your solution almost identically to yours with almost the same validations: isn't it kind of a vulnerability that an user can spam the send button or creating a script to completely flood your inbox? If that's the case, what can I do to prevent that from happening?

Ответить
Kornji
Kornji - 27.04.2023 10:36

Thank you so much! you save my life!

Ответить
Subhadip Bisai
Subhadip Bisai - 26.04.2023 13:49

if I want to change "from" and "to" for differnet mail then this EMAIL_PASS pin is needed for both mail ?? how can i do that?

Ответить
Martin Svendsen
Martin Svendsen - 26.04.2023 09:51

keep getting an ERR_ABORTED 405 (Method not allowed) following this tutourial

Ответить
carboni
carboni - 24.04.2023 15:22

Great tutorial. One question though. I would like to send the automated confirmation email to the client, rather than to myself. How do you adjust the mailOptions function to allow this? Thanks in advance

Ответить
Google User
Google User - 17.04.2023 00:32

Could you make a version of this video that does not rely upon chakara?

Ответить
Илья
Илья - 12.04.2023 22:26

Thank you so much, your video helped me a lot

Ответить
Gui Chi
Gui Chi - 08.04.2023 17:43

Hey, can you update in the comment section for other that in order to find google app password you need to go in 2 STEP verification section and scroll down at the bottom to add an app password, google doesn't like to us to use this because, of "security" reason, for which is understandable if it badly managed.

It took me a little time to find out in all the options that "app password"

search on the internet aren't helpfull about it.


Thanks in advance.
Edited: => I've just completed, work like a charm, thanks, I'm just a little bit worry about security issues via production build.

Ответить
Igor
Igor - 07.04.2023 16:19

Greate tutorial! How did you solve the problem of sending a message from Vercel hosting?

Ответить
Evan Marshall
Evan Marshall - 06.04.2023 21:27

I followed this video verbatim and it works flawlessly. Well, I adapted it a bit to use TailwindCSS for the contact form but still works great... locally. When I push to my production deployment on Vercel and test it live, it does not work. I added the environment variables (EMAIL & EMAIL_PASS) to Vercel settings thinking that was the issue, but still no fix. Can anybody help me with this? Does anybody have similar issues?

EDIT: Needed to perform a new deployment after adding Envrionment Variables to Vercel in order to update the site with the variables. Ran a test and it works!! Thank you!

Ответить
Praying Lotus
Praying Lotus - 02.04.2023 01:06

Thank you so much for this. Was bashing my head against a wall trying to figure out how to send an email without using a paid service. What I'm wondering now is how, whoever submitted the form, they get a confirmation email as well.

Ответить
devpako
devpako - 30.03.2023 21:50

Good job, but I need help if you can. I want to use this form to send email with attachment or embedded image. Nodemailer has an example for it but that example uses locally stored images which is not what I need. I need user to be able to upload picture and send it to email. Please give me some guidance.

Ответить
ElitKondor
ElitKondor - 29.03.2023 15:01

As far as I could tell, gmail does not support media queries

Ответить
KRay
KRay - 29.03.2023 04:21

Awesome tutorial!! Well explained and you saved me hours for implementing a email handler!!

Ответить
alica
alica - 28.03.2023 00:08

How can I fixed this? thanks

Ответить
alica
alica - 28.03.2023 00:07

I am getting this error : Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
at TLSSocket.emit (events.js:375:28)
at TLSSocket._finishInit (_tls_wrap.js:936:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12) {
code: 'ESOCKET',
command: 'CONN'
}

Ответить
Sergio Sánchez
Sergio Sánchez - 24.03.2023 23:37

Super helpful, thank you very much. Keep up the good work!

Ответить
ATS GLOBAL SERVICES
ATS GLOBAL SERVICES - 24.03.2023 21:21

Great video

Ответить
Deveesh Shetty
Deveesh Shetty - 24.03.2023 10:55

Man thanks a lot..... I was struggling with OAuth2 Client (it worked in development but never in production) since 2 days. And this video saved me. Thank you :))

Ответить
Kuba S.
Kuba S. - 19.03.2023 21:44

Very helpful. Subbed. Thank you.

Ответить
Felipe Cataneo
Felipe Cataneo - 14.03.2023 03:09

Hello I´m getting
Error: self-signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1538:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket._finishInit (node:_tls_wrap:952:8)
at ssl.onhandshakedone (node:_tls_wrap:733:12) {
code: 'ESOCKET',
command: 'CONN'

Ответить
TechLight
TechLight - 07.03.2023 05:47

Thank you for create amazing clearly tutorial. So helpful for me.

Ответить
Moyn Gaming
Moyn Gaming - 25.02.2023 11:46

didn't work for me, Getting this Error Error: Missing credentials for "PLAIN". Please help

Ответить
WilD 3D CGI
WilD 3D CGI - 23.02.2023 23:49

thx u a lot man for such awesome tutorial

Ответить
Kiko Nunez
Kiko Nunez - 23.02.2023 08:34

Thank you for the tutorial! I got everything working until the very end. The contact form works on my localhost but not on my deployment link with Vercel. I keep getting "Failed to send message" using my deployment link. Any idea why?

Ответить
Juan Rios
Juan Rios - 20.02.2023 23:09

Perfectly explained and definetely a huge help on my learning journey as a developer, Thank You!!

Ответить