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
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?
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.
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?
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 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.
@@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?
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' }
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.
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.
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)
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
Great video Ethan, thank you!
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?
I hope you get a gold plated RUclips logo one day
Me too. Meeee too.
do you think also implementing a google captcha is useful when using services like mailgun? or is it not really necessary?
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.
So much fun 😀 - Can you update for the new NextJS 13?
Guess I should get on that!
@@ethan_mick you should :D
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?
AMAZING tutorial thanks
Great vid. Confetti made it all the better!
Thanks! I'm going to have some more news here soon :)
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
You can use this package (github.com/jellydn/next-swagger-doc) to generate Swagger Docs from the API Route JSDoc. Give that a try.
how do i get my mailgun domain?
A rising star! nice tuto
Thank you! Hope it helped!
@@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.
@@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?
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'
}
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.
@@gubmx20 Hi, I tried inputing the newly generated api key in the .env.local file, but it still doesn't work. Please help
Thank you for the video!!
My pleasure!
Thank you. What about sending an email to all who signed up?
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.
@@ethan_mick Thanks. Looks like mailchimp is the go-to. what do you think?
How to send email attachment
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.
Please Create a video of Creating Blog site. I your own one really good one.
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)