Send Emails in Node.js | NodeMailer Tutorial

  Рет қаралды 98,765

OpenJavaScript

OpenJavaScript

Күн бұрын

👉 Source code: openjavascript...
‍🎓 NEW: Earn a professional certificate in web development from Meta Inc. (course links in card below) 👇
⚡ Need hosting for a website, WordPress blog or Node.js app? We use HostWithLove: bit.ly/3V2RM9Q ❤️
This tutorial shows you how to send emails in Node.js using the NodeMailer package. Includes how to send an email to multiple addresses and add attachments.
#email #emails #nodejs #nodejstutorial #nodemailer #smtp #javascript
Gmail SMTP server details: support.google...
⚡Web development professional certificates from Meta Inc.⚡
Front-End Developer Professional Certificate: imp.i384100.ne...
Back-End Developer Professional Certificate: imp.i384100.ne...
iOS Developer Professional Certificate: imp.i384100.ne...
Meta Android Developer Professional Certificate: imp.i384100.ne...
Meta Database Engineer Professional Certificate: imp.i384100.ne...

Пікірлер: 54
@John-wx3zn
@John-wx3zn Ай бұрын
Thank you. You are a great teacher. I hope you are blessed.
@kevinsuvarna1795
@kevinsuvarna1795 Жыл бұрын
Thank you so much for this video. It really helped me out a lot!
@OpenJavaScript
@OpenJavaScript Жыл бұрын
That's great to hear! Always happy to hear somone has found a tutorial useful :)
@puneetvaishnav949
@puneetvaishnav949 2 ай бұрын
Thank you, sir, Your explanation is best. I understand a lot of new things
@RunyCalmera
@RunyCalmera Ай бұрын
Thanks!!! Very helpful Why do you need gmail as a host? What is the function of the host? Are there any open source hosts?
@LeBruitDesPotes
@LeBruitDesPotes Жыл бұрын
Hello, thank you for this video. I've had no problem to make it work on my computer but when I'm putting it on production the server returns an error 535 'authentification error' command: 'AUTH PLAIN', I've tried a lot of things but it's still the same issue. Have you got some clue of what is happening?
@YoSoyRaulTV
@YoSoyRaulTV Жыл бұрын
NICE! thanks
@OpenJavaScript
@OpenJavaScript Жыл бұрын
You're welcome, glad you liked it!
@sebastianmeckovski9980
@sebastianmeckovski9980 6 ай бұрын
so easy when doing it locally. Once you try to deploy it that's when you get into issues
@ineschavez5194
@ineschavez5194 8 күн бұрын
What kind of issues do you run into when running deploying it?
@superboring7990
@superboring7990 Жыл бұрын
❤❤ Thank you sir!!
@user-mk7rp4ev4p
@user-mk7rp4ev4p 7 ай бұрын
Thank you very much Sir
@hasanv
@hasanv Жыл бұрын
Thanks, would be helpful
@OpenJavaScript
@OpenJavaScript Жыл бұрын
Yes, can definitely be extremely useful to know how to do this :)
@kuldeeppanwar9513
@kuldeeppanwar9513 10 ай бұрын
Thanks bro
@ivanananiev6618
@ivanananiev6618 9 ай бұрын
Nice video
@innocent3163
@innocent3163 5 ай бұрын
Sir, it’s work fine in dev, but not sending emails in production, what to do ?
@cloudsystem3740
@cloudsystem3740 Жыл бұрын
thank you very much please make a tutorial with imap :)
@OpenJavaScript
@OpenJavaScript Жыл бұрын
You are welcome and thanks for the tutorial suggestion! Putting it on the ideas list :)
@great7527
@great7527 Жыл бұрын
Hello, how can I message you directly?
@DrugNStyleMUFEVO
@DrugNStyleMUFEVO Жыл бұрын
the pass inside the auth is the login pass? or something that the SMPT2GO provides?
@OpenJavaScript
@OpenJavaScript Жыл бұрын
The pass is the regular password for your email account, though for some services such as Gmail you now have to use an 'app password' for security reasons. You can do this for Gmail in the security section on your main account after enabling two-factor authentication.
@geminiatwork
@geminiatwork Жыл бұрын
Hi is there any tutorial how to send attachment via file input?
@OpenJavaScript
@OpenJavaScript Жыл бұрын
I have a tutorial on how you can get a file in Node.js from a file input on the frontend: kzbin.info/www/bejne/iovZfn-Ne7uJnqc Then you can send the received file as the attachment instead.
@MuhammadFaizanVlogger
@MuhammadFaizanVlogger 6 ай бұрын
emailjs plan offer 200 request for every month or just for one time 200 requests?
@devngecu
@devngecu Жыл бұрын
How do you go about with the "less secure app access " feature that was removed from May 2022?
@360-jatin6
@360-jatin6 Жыл бұрын
Same doubt
@OpenJavaScript
@OpenJavaScript Жыл бұрын
Seems that for Gmail now, you need to enable two-factor authentication on your Google account and, after that, generate an app password (you should be able to manage all of this in the security section of your account). Then, use this password instead of your regular one in Nodemailer.
@OpenJavaScript
@OpenJavaScript Жыл бұрын
@@360-jatin6 See my response to the first comment
@idrin6799
@idrin6799 Жыл бұрын
@@OpenJavaScript Works fine, thank you!!
@OpenJavaScript
@OpenJavaScript Жыл бұрын
@@idrin6799 Nice, you're welcome!
@LowkeyCoder
@LowkeyCoder 11 ай бұрын
is there any way to send large no emails to my customers?
@priyanshjain9746
@priyanshjain9746 Жыл бұрын
when deploy this program in c panel email not sent
@zachariantsoditalakgale4025
@zachariantsoditalakgale4025 3 ай бұрын
thank you
@Seedley
@Seedley Жыл бұрын
how are you able to use your custom domain instead of a gmail domain?
@OpenJavaScript
@OpenJavaScript Жыл бұрын
In case you don't have one already, you'd need to purchase a domain. These can be quite cheap if you don't want an in-demand one (I just checked and see domains falling into this category selling for $15 per year). Then you'd need a server connected to that domain. For this, I'd recommend shared hosting as this can be an afforable solution as long as you are not planning on running a heavy-bandwidth service.The hosting provider I currently use (also in the video example) is HostWithLove: bit.ly/3V2RM9Q You can also purchase a domain through HostWithLove and ask them to connect it to your hosting if you decide to go with them.
@colindante5164
@colindante5164 7 ай бұрын
@@OpenJavaScript Thanks for the tutorial and sharing your hosting provider. Hope they'll be able to host my node app. cheers))
@saisashreek9249
@saisashreek9249 9 ай бұрын
Hey i have used your codes but for gmails it says queued.
@tatsumii1420
@tatsumii1420 10 ай бұрын
can i do this in react also?
@user-rn7nv8xl7d
@user-rn7nv8xl7d Жыл бұрын
hello, sending to multiple recipient puts all addresses in the 'To' field, please how can they to individual recipient
@user-rn7nv8xl7d
@user-rn7nv8xl7d Жыл бұрын
ok got it, i changed to bcc
@OpenJavaScript
@OpenJavaScript Жыл бұрын
Nice, thanks for posting the solution so maybe someone with the same issue comes across this :)
@karim7788
@karim7788 Жыл бұрын
How can i get my company's SMTP server hostname?? Plz help
@OpenJavaScript
@OpenJavaScript Жыл бұрын
If you have cPanel access, you can get it by accessing an email account through it and then -> Webmail Home -> Configure Mail Client. You should be able to see the SMTP server information there.
@GaganDeepSingh-mg8hl
@GaganDeepSingh-mg8hl Жыл бұрын
bro when i use this in vps server, it shows error like : Error: Missing credentials for "PLAIN", what can i do for that
@OpenJavaScript
@OpenJavaScript Жыл бұрын
I'm not certain but some things you can try that may help but are NOT secure, deployment applicable solutions: - Try disabling adblocker when testing - Add the following property to the transporter (warning: allows your app to connect to untrusted sites without a certificate): tls: { rejectUnauthorized: false } Also, make sure your source code matches mine by using the one posted here: openjavascript.info/2023/01/10/nodemailer-tutorial-send-emails-in-node-js/
@GaganDeepSingh-mg8hl
@GaganDeepSingh-mg8hl Жыл бұрын
@@OpenJavaScript bro i did a mistake that i didnt have my .env on my server 😂😂
@OpenJavaScript
@OpenJavaScript Жыл бұрын
@@GaganDeepSingh-mg8hl OK, glad to hear it's resolved!
@cloudsystem3740
@cloudsystem3740 Жыл бұрын
try const transporter = nodeMailer.createTransport({ host: process.env.MAIL_HOST , port: 587, auth: { user: process.env.MAIL_USER, pass: process.env.MAIL_PASSWORD }, tls: { rejectUnauthorized: false, minVersion: "TLSv1.2" } });
@muhammadsharif5526
@muhammadsharif5526 Жыл бұрын
In create transport function you should pass in auth object instead of password
@OpenJavaScript
@OpenJavaScript Жыл бұрын
Thanks for watching! 👉 Source code: openjavascript.info/2023/01/10/nodemailer-tutorial-send-emails-in-node-js/
Send Mail with Nodemailer Using Node.js Backend
28:30
Daily Tuition
Рет қаралды 82 М.
How easy it is to send email in nodejs using NodeMailer #nodejs #nodemailer
5:31
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 82 МЛН
ДОКАЗАЛ ЧТО НЕ КАБЛУК #shorts
00:30
Паша Осадчий
Рет қаралды 933 М.
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 11 МЛН
The Joker kisses Harley Quinn underwater!#Harley Quinn #joker
00:49
Harley Quinn with the Joker
Рет қаралды 43 МЛН
How to Send Emails with Next JS and Nodemailer
37:25
Nikita Dev
Рет қаралды 84 М.
Send automated emails with Node.js! (with Nodemailer)
10:41
Random Coder
Рет қаралды 77 М.
MySQL in Node.js Tutorial | CRUD and Creating Databases
20:43
OpenJavaScript
Рет қаралды 8 М.
Send Emails with React Node and Nodemailer
24:48
9jaCoder
Рет қаралды 5 М.
Create & Send Custom Emails with React Email & Resend
14:34
Colby Fayock
Рет қаралды 61 М.
How to send Emails through REACT JS + Node JS [EASY!!!]
29:00
Koding 101
Рет қаралды 18 М.
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 82 МЛН