How to Send Emails in Next.js Using Nodemailer and SMTP | Next.js 14 App Router Email Client

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • Learn how to send emails in #Next.js! This easy tutorial shows you how to use #Nodemailer and #SMTP in Next.js.
    Happy #coding

КОМЕНТАРІ • 17

  • @Frank.T2
    @Frank.T2 День тому

    There were some errors with the code from the video but after some troubleshooting I was able to get it working with mailtrap. Thanks!

  • @Jeffrey_Benedict
    @Jeffrey_Benedict 19 днів тому +1

    Very helpful man, great work.

  • @khanhlinhinh50
    @khanhlinhinh50 3 місяці тому +1

    Thank you so much for this tutorials.
    The knowledge you teach in this video really helps in my project
    Can you make a video about upload and download files using nest js and next js?

    • @-kokteal8406
      @-kokteal8406 3 місяці тому

      Does this work with real email addresses or just fake ones?

  • @SkyrimBeast
    @SkyrimBeast 7 днів тому

    Hi ZestMade, thanks for this video. Given how NextJS can be finicky, does it matter whether we're using the src directory or not? In my current project, I'm using the app directory without the src directory. Folder structure noted below:
    /app
    /components
    /public

  • @joygaming7245
    @joygaming7245 2 місяці тому +1

    Love you bro

  • @elradad
    @elradad 2 місяці тому

    Awesome tutorial bro

    • @ZestMade
      @ZestMade  11 днів тому

      Glad you liked it

  • @martinkarugaba
    @martinkarugaba 3 місяці тому

    Thanks @ZestMade. How can I adjust this to send to a gmail account?

  • @bongofo4105
    @bongofo4105 12 годин тому

    @ZestMade Does this work in production deployed to vercel? i have not been able to get vercel to work

  • @hassanbajwa5640
    @hassanbajwa5640 11 днів тому

    do we need to put the gmail normal password or gmail app password

    • @ZestMade
      @ZestMade  11 днів тому

      If you're asking how to receive the email in the recipient's Gmail (or other) inbox,
      Mailtrap for testing sends emails to Mailtrap inbox, irrespective of what you supply as the recipient. To send the email to the actual recipient, simply replace the Mailtrap SMTP credentials (which is for testing purposes) with an SMTP credentials that sends to real emails such as credentials from Sendgrid, Amazon SES, Mailgun, Zoho, and even credentials from your Cpanel, etc.

    • @hassanbajwa5640
      @hassanbajwa5640 10 днів тому

      @@ZestMade thanku so much

    • @hassanbajwa5640
      @hassanbajwa5640 10 днів тому

      @@ZestMade my code is working on local host but not on production.

  • @nanonkay5669
    @nanonkay5669 4 місяці тому

    Does this work with real email addresses or just fake ones?

    • @-kokteal8406
      @-kokteal8406 3 місяці тому

      +1

    • @ZestMade
      @ZestMade  2 місяці тому

      Surely, it/nodemailer works with "real" email addresses. You just need to supply "real" SMTP credentials from the email service provider you're using.