Send Emails in Node.js | NodeMailer Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 59

  • @BonnUmunna
    @BonnUmunna หลายเดือนก่อน +1

    You are a good teacher. This has saved me from stress. Please do a video on adding Google login and Signup Oauth

    • @amuga_1
      @amuga_1 14 วันที่ผ่านมา

      Oh boy Oauth is like impossible

  • @kevinsuvarna1795
    @kevinsuvarna1795 ปีที่แล้ว +8

    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 :)

  • @sebastianmeckovski9980
    @sebastianmeckovski9980 8 หลายเดือนก่อน +5

    so easy when doing it locally. Once you try to deploy it that's when you get into issues

    • @ineschavez5194
      @ineschavez5194 3 หลายเดือนก่อน

      What kind of issues do you run into when running deploying it?

  • @John-wx3zn
    @John-wx3zn 3 หลายเดือนก่อน

    Thank you. You are a great teacher. I hope you are blessed.

  • @puneetvaishnav949
    @puneetvaishnav949 5 หลายเดือนก่อน +1

    Thank you, sir, Your explanation is best. I understand a lot of new things

  • @IvetaNovakova-zy1kb
    @IvetaNovakova-zy1kb หลายเดือนก่อน

    Thank you. Very helpful video.

  • @rizmandesu
    @rizmandesu หลายเดือนก่อน

    thanks, it's working

  • @RunyCalmera
    @RunyCalmera 4 หลายเดือนก่อน

    Thanks!!! Very helpful
    Why do you need gmail as a host?
    What is the function of the host?
    Are there any open source hosts?

  • @YoSoyRaulTV
    @YoSoyRaulTV ปีที่แล้ว +1

    NICE! thanks

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว

      You're welcome, glad you liked it!

  • @superboring7990
    @superboring7990 ปีที่แล้ว

    ❤❤
    Thank you sir!!

  • @DrugNStyleMUFEVO
    @DrugNStyleMUFEVO ปีที่แล้ว +2

    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.

  • @devngecu
    @devngecu ปีที่แล้ว +4

    How do you go about with the "less secure app access " feature that was removed from May 2022?

    • @360-jatin6
      @360-jatin6 ปีที่แล้ว +1

      Same doubt

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว +7

      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 ปีที่แล้ว +1

      @@OpenJavaScript Works fine, thank you!!

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว

      @@idrin6799 Nice, you're welcome!

  • @RohitPahuja-mw3pz
    @RohitPahuja-mw3pz หลายเดือนก่อน

    thanks dudde

  • @JonathanizouguNigerialimitedIz
    @JonathanizouguNigerialimitedIz 10 หลายเดือนก่อน

    Thank you very much Sir

  • @hasanv
    @hasanv ปีที่แล้ว +1

    Thanks, would be helpful

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว

      Yes, can definitely be extremely useful to know how to do this :)

  • @innocent3163
    @innocent3163 8 หลายเดือนก่อน

    Sir, it’s work fine in dev, but not sending emails in production, what to do ?

  • @geminiatwork
    @geminiatwork ปีที่แล้ว +1

    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:
      th-cam.com/video/TZvMLWFVVhE/w-d-xo.html
      Then you can send the received file as the attachment instead.

    • @joetworks_
      @joetworks_ หลายเดือนก่อน

      Can pdf doc be attached instead of image?

  • @ivanananiev6618
    @ivanananiev6618 11 หลายเดือนก่อน

    Nice video

  • @sezyboii
    @sezyboii 2 หลายเดือนก่อน

    How do I put this into a website?

  • @Seedley
    @Seedley ปีที่แล้ว +1

    how are you able to use your custom domain instead of a gmail domain?

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว +4

      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 9 หลายเดือนก่อน

      @@OpenJavaScript Thanks for the tutorial and sharing your hosting provider. Hope they'll be able to host my node app. cheers))

  • @CrashBeastt
    @CrashBeastt 8 หลายเดือนก่อน

    emailjs plan offer 200 request for every month or just for one time 200 requests?

  • @mecuryblanche
    @mecuryblanche ปีที่แล้ว

    hello, sending to multiple recipient puts all addresses in the 'To' field, please how can they to individual recipient

    • @mecuryblanche
      @mecuryblanche ปีที่แล้ว +1

      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 :)

  • @priyanshjain9746
    @priyanshjain9746 ปีที่แล้ว

    when deploy this program in c panel email not sent

  • @kuldeeppanwar9513
    @kuldeeppanwar9513 ปีที่แล้ว

    Thanks bro

  • @great7527
    @great7527 ปีที่แล้ว +1

    Hello, how can I message you directly?

  • @saisashreek9249
    @saisashreek9249 ปีที่แล้ว

    Hey i have used your codes but for gmails it says queued.

  • @GaganDeepSingh-mg8hl
    @GaganDeepSingh-mg8hl ปีที่แล้ว +2

    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  ปีที่แล้ว +1

      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 ปีที่แล้ว +3

      @@OpenJavaScript bro i did a mistake that i didnt have my .env on my server 😂😂

    • @OpenJavaScript
      @OpenJavaScript  ปีที่แล้ว +2

      @@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

  • @tatsumii1420
    @tatsumii1420 ปีที่แล้ว

    can i do this in react also?

  • @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.

  • @cloudsystem3740
    @cloudsystem3740 ปีที่แล้ว +1

    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 :)

  • @OpenJavaScript
    @OpenJavaScript  ปีที่แล้ว +1

    Thanks for watching!
    👉 Source code: openjavascript.info/2023/01/10/nodemailer-tutorial-send-emails-in-node-js/

  • @zachariantsoditalakgale4025
    @zachariantsoditalakgale4025 5 หลายเดือนก่อน

    thank you