Build a contact form and send an email with React + Next.js (End-To-End!)

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 33

  • @spongebobhr818
    @spongebobhr818 Год назад +1

    Thank you so much, I am a new dev and am trying to get a newsletter down and couldnt find much support with axios and other next tools and didnt really feel like reading docs. Your video broke it down a lot and explained it xtremely well. Good luck out there

  • @isaaclongoria229
    @isaaclongoria229 3 месяца назад

    Great video Ethan, thank you!

  • @wolfie8748
    @wolfie8748 4 месяца назад +1

    but this is basically me messaging me ?
    when I check who sent the email it is the user we entered so how can random people mail me for my portfolio website?

  • @fujisan0388
    @fujisan0388 Год назад +4

    I hope you get a gold plated RUclips logo one day

  • @fmentz
    @fmentz Год назад +3

    do you think also implementing a google captcha is useful when using services like mailgun? or is it not really necessary?

    • @ethan_mick
      @ethan_mick  Год назад +1

      I'd think about attack vectors. If someone were to abuse the endpoint what would happen? Who is damaged? How bad will it be? Most of the time a contact form is not going to be abused. You can also look into rate limits on the Mailgun side to protect against abuse.
      Of course, if an attacker *does* abuse the form, then implementing Google Captcha is a good solution to stop bots.

  • @davidfeldt1362
    @davidfeldt1362 Год назад +1

    So much fun 😀 - Can you update for the new NextJS 13?

  • @gubmx20
    @gubmx20 8 месяцев назад

    Very nice tutorial! I did almost the same thing, but instead I used resend to send the emails. By the way, you're so fast using VIM. do you have any tutorial about how do you configured it?

  • @DonKassim
    @DonKassim 8 месяцев назад

    AMAZING tutorial thanks

  • @0xTRellyx0
    @0xTRellyx0 Год назад

    Great vid. Confetti made it all the better!

    • @ethan_mick
      @ethan_mick  Год назад

      Thanks! I'm going to have some more news here soon :)

  • @ahmedhassaballa9909
    @ahmedhassaballa9909 Год назад

    Thanks Ethan very much for your great session, i would like to ask if i would like to use Swagger openAPI in this session, is it possible? if yes which part should i replace it with swagger? i got a bit confused about swagger usage and how can i fit it inside my form ! thank you

    • @ethan_mick
      @ethan_mick  Год назад

      You can use this package (github.com/jellydn/next-swagger-doc) to generate Swagger Docs from the API Route JSDoc. Give that a try.

  • @tenasantiago8218
    @tenasantiago8218 10 месяцев назад

    how do i get my mailgun domain?

  • @automioai
    @automioai Год назад

    A rising star! nice tuto

    • @ethan_mick
      @ethan_mick  Год назад +1

      Thank you! Hope it helped!

    • @automioai
      @automioai Год назад +1

      @@ethan_mick oh yes it did. An idea for your next tuto : "creating an custom API for a webpage" you explanation is so clear so I would like to watch you explaining this stuff, this days working with APIs is important.

    • @ethan_mick
      @ethan_mick  Год назад

      @@automioai Thanks! I do have a video on creating a REST API in Next.js: ruclips.net/video/Sv1b-P2dO2E/видео.html Do you want to see something more? What would that be?

  • @aadargupta
    @aadargupta 10 месяцев назад

    Hey! I made it close to the end but the only step that isn't working for me is the actual sending of the email:
    Error sending email: [Error: Unauthorized] {
    status: 401,
    details: 'Forbidden',
    type: 'MailgunAPIError'
    }

    • @gubmx20
      @gubmx20 8 месяцев назад

      humm, it seems that you're using the public API KEY. try to create a new API KEY, don't forget to put it in you .env file.

    • @sithulin2024
      @sithulin2024 7 месяцев назад

      ​@@gubmx20 Hi, I tried inputing the newly generated api key in the .env.local file, but it still doesn't work. Please help

  • @deenayoussry4584
    @deenayoussry4584 Год назад

    Thank you for the video!!

  • @lightninginmyhands4878
    @lightninginmyhands4878 Год назад

    Thank you. What about sending an email to all who signed up?

    • @ethan_mick
      @ethan_mick  Год назад

      This depends a little bit your backend. Most services let you create a "mailing list" and you can just send a single email to that list. Otherwise, you'd need to iterate over the items in your database or service and send an email to each user.

    • @lightninginmyhands4878
      @lightninginmyhands4878 Год назад

      @@ethan_mick Thanks. Looks like mailchimp is the go-to. what do you think?

  • @mdnurullah9882
    @mdnurullah9882 Год назад +1

    How to send email attachment

    • @ethan_mick
      @ethan_mick  Год назад +1

      You'll need to hook that up server side with your email provider. For example, Mailgun (documentation.mailgun.com/en/latest/api-sending.html#sending) you can add an `attachment` key.

  • @Amelias_Vibe
    @Amelias_Vibe Год назад

    Please Create a video of Creating Blog site. I your own one really good one.

    • @ethan_mick
      @ethan_mick  Год назад

      Thanks! I'll add that to my list. If you want to see my old blog source code, you can check it out here: github.com/ethanmick/ethanmick.com (This is NO LONGER my blog, but might give you some ideas)