Chris, you’re still going strong, that’s awesome to see. Very well deserved.
@CodinginPublic Жыл бұрын
Thanks, my friend!
@simonswiss Жыл бұрын
You are absolutely KILLING IT with this KZbin channel - learning so much from you 🙏🙏🙏
@CodinginPublic Жыл бұрын
Simon! That means so much coming from you. Thanks, man! Now I just finally need to get around to doing some Keystatic content! 😉
@dvzz73974 ай бұрын
Guys, if you are using hybrid in the output, remember to put "export const prerender = false" in the endpoint.
@latch909 Жыл бұрын
Love the super speedy delivery actually - I can learn the big picture in one pass, plus note what I don't grok and go back and dig in. Appreciate your vids!
@CodinginPublic Жыл бұрын
Thanks for the feedback! Yes, that was my intention. Just trying to quickly show possible use cases since email implementation is always so personal. Glad you liked the faster-than-normal delivery.
@otisrancko Жыл бұрын
I am never using Google's API again after this....there tokens expiring and recurring payments were expensive for small projects. This is useful piece of content!!!
@CodinginPublic Жыл бұрын
Glad you enjoyed it!
@teinett Жыл бұрын
Thank for the video! Everything happens so quickly in this video. At first I even thought that my playback speed was x1.5. Previous videos were not as fast and therefore more understandable from the first viewing.
@CodinginPublic Жыл бұрын
Yeah-it was definitely a faster delivery-especially after the first 5 steps. Sorry it felt a little fast, but I was mostly just wanting to show possible use cases since it's so personal to the user. Thanks for the feedback!
@spacecoder052611 ай бұрын
My astro project shows `Named export 'html' not found. The requested module 'js-beautify' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using: import pkg from 'js-beautify'; const { html } = pkg;` this error after I followed @7:37 . i don't know how to fix it...
@wojtek620610 ай бұрын
I'm facing the same problem. No idea how to fix it 😕 I've also upgraded Astro but it didn't help.
@gstreetgames2530 Жыл бұрын
Oh boy, of all my years developing web and game software, all I ever thought about was "Damn I wish upon a star that this development work could be made easier and faster when it comes to emailing. If only my time spent emailing people could be improved, I wouldn't need to be sitting at the computer for hours every day." Yeah, the email client that I use was always at the top of my list of desires as a modern programmer!
@CodinginPublic Жыл бұрын
Ha, sounds like you have a lot more dev experience than me :)
@Action2me Жыл бұрын
That sounds like sarcasm. Is it? Because honestly I wholeheartedly agree with this comment if it’s sincere.
@TheGuillotineKing Жыл бұрын
It's obviously sarcasm
@p0xygen11 ай бұрын
@@CodinginPublic Yeah sounds like he does
@finnjenn9 ай бұрын
I am a front-end freelancer who recently built a couple simple SPA's with astro but am having a hard time understanding the backend parts of this tutorial. Any ideas on where I should begin?
@jitxhere Жыл бұрын
Wow Chris Awesome explanation. Resend does solve a lot of issue.
@CodinginPublic Жыл бұрын
Glad you enjoyed it! Resend is 🔥!
@elieobeid77 Жыл бұрын
sending emails from the frontend is a bad idea, if the user closes the browser before the email is being sent then the email wont be sent. If the user has adblocker or something, it might cause js issues and the email wont be sent. It's just a bad idea to do any business logic from the frontend. Also I don't understand the point of Resend, we already have Sendmail and Maillgun etc.
@iKyroja Жыл бұрын
True, nothing to add here.
@matt_hart Жыл бұрын
where is he sending emails from the frontend?
@aberba Жыл бұрын
Email will be sent but won't see response. Yes, it's not a good idea, to send from frontend. This video isn't sending from frontend though. He's using an API route.
@jchiatt4 Жыл бұрын
No one is sending email from the frontend, relax buddy
@CodinginPublic Жыл бұрын
Hey, I may not have been clear enough in the video, but like I mentioned, you'd want to set up an authenticated route if you want to send emails like this. You'd likely also want to add an API key or some kind of internal check server-side for the actual call to send the emails. Just didn't want to set all that up in this example to show off Resend. Thanks for the comment.
@rayandedoschevic288411 ай бұрын
Resend works in dev mode but when I put it in production (Vercel) contact form gives me 405 error. Also I am not using React, Preact....just pure Astro. Any advice?
@AndresMartinez-se9zl8 ай бұрын
Would it work with ssg? I just need resend for a contact form.
@CodinginPublic7 ай бұрын
Sure! You could have your page rendered in SSG. But to protect your api key, you’d want to hit a server endpoint that’s protected. Astro’s hybrid rendering would be great here. The whole site will be SSG but you could mark the api POST route as prerender=false to make it alone SSR.
@joaooliveirarocha11 ай бұрын
we started with react-email but at the time (start of last year) it didn't work that well: the , and other components didn't work. Also we were supposed to use only inside s but there was no documentation on it, etc. We end up ditching it and work around with `react-dom`, some dangerously-set-html, liquid.js parseSync and some custom rules and works perfectly. I don't know how react-email had 8k stars on GH at the time... I doubt even 5% of those stars actually tried the library
@jairo9super4 Жыл бұрын
Great, could you show how to deploy what you just created? It's simply an "npm run build" and upload it to the hosting and that's it? I'm a little lost with that
@CodinginPublic Жыл бұрын
You'd want to hide this behind authentication before publishing, so that's why I didn't show :)
@codebreaker249511 ай бұрын
@@CodinginPublic I'm stuck in that, i wanted to deploy it to Netlify or Vercel, but when i run npm run build, it returns 2 folders inside "/dist", /client & /server, but there's no index file (.html), so when i deploy it, i get a 404 not found, could you explain me how to make a deploy correctly please?
@none4614 Жыл бұрын
Hi Chris. Thanks for your interesring video. Which 3rd parties in your terminal setup ? ❤
@CodinginPublic Жыл бұрын
I use fig.io in VSCode and Warp as my standalone terminal :)
@trashmail-d1q11 ай бұрын
How did you theme your terminal? Any link? And thanks a lot for helping the community.
@CodinginPublic9 ай бұрын
My prompt is using starship I think? I don’t know if I have a tutorial on it, but it’s fairly easy to setup from their site.
@brx-hashcode Жыл бұрын
Please Chris which Vs Code theme are you using?
@CodinginPublic Жыл бұрын
Material Palenight High Contrast: marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme
@brx-hashcode Жыл бұрын
Thank you Chris!
@Zagoorland Жыл бұрын
what do you use for terminal settings, theme and autocomplete?
@CodinginPublic Жыл бұрын
fig.io in the VScode terminal. I'm using a custom starship prompt. And I use Warp as my standalone terminal. Hope that helps!
@adnanamin3666 Жыл бұрын
Amazing. Finally something good in emails. Thanks Chris, for covering this. BTW, what's that icon pack and theme you're using? Will you please share the extebsion names?
@CodinginPublic Жыл бұрын
Bearded Icons :)
@duckdev944710 ай бұрын
Any improvements from nodemailer?
@CodinginPublic10 ай бұрын
It would be worth looking at their docs, but they do a lot of stuff for DKIM and other email requirements to ensure your emails actually land in people’s inboxes. It's not perfect, but they take care of all of that for you.
@ricardoduarte442 Жыл бұрын
How would you handle the api so that only requests from your website can be authorized? It would be a problem having user just hit that POST Route and sending from your email whatever they want.
@IainSimmons Жыл бұрын
Yeah you'd want it behind auth, of which there are many options, the simplest being a login and cookies (handled on the server of course)
@CodinginPublic Жыл бұрын
Like Iain said :). I did mention in the video that you'd want to set this up behind auth, but didn't want to set all that up to just stay focused on Resend in this video.
@guyman8282 Жыл бұрын
what font are you using in vscode
@CodinginPublic Жыл бұрын
Cascadia Code (free font by Microsoft)
@FaizanAnwerAli Жыл бұрын
I wonder if it is sending multiple requests to server API for each email or one requests to server API to send all emails at once from backend.
@CodinginPublic Жыл бұрын
Right now, the way I'm showing it, it's a single request for each email. So for bigger use cases you'd probably want to do a lot of this logic on the server and send something smaller over the network. So just a quick example, not the be-all end-all.
@badcatdesign Жыл бұрын
Email is hard. You make this look easy. I'll still stick with MJML though - "slightly less" setup :)
@CodinginPublic Жыл бұрын
lol I’ve used MJML once but found it clunky. It’s been a bit though and I’m better with react now, so it may have been my fault :)
@badcatdesign Жыл бұрын
@@CodinginPublic Clunky is kind. But there's 100% less setup time which is a plus for me.
@alexisviscogliosi278511 ай бұрын
Their approach is wrong, because it locks you. Just the last week we were in outage with our mail provider and we were using their apis (like resend, nothing new btw) and the fact that we were using the API blocks us to switch email provider. Now, I will use mjml + smtp protocol. In that way we can switch to any mail provider.
@amayweather Жыл бұрын
Its looks great, i really wait when C# will be added
@iWhacko Жыл бұрын
if you need a tool like this then take some more programming lessons. The "problem" this tool is trying to solve is non-existent. It's ridiculously easy to send emails in most languages, even with templating engines. instead of static html.
@amayweather Жыл бұрын
chill man .i am seeking a service the functionality that i needed , it rather than building your own solution. and i know that in most of langs you can code sending email)
@CodinginPublic Жыл бұрын
They move fast, so hopefully soon!
@voidbinary Жыл бұрын
As one that had to deal with email automation for several years. There only are two crucial issues why E-Mail Templates are a pain. 1. Outlook rendering HTML with the Word HTML renderer and the implied chaos of older Outlook versions 2. Clients never updating their clients forcing us to support the stone age rather than standards.
@CodinginPublic Жыл бұрын
Curse you, outlook!
@ahsanhabibasha690611 ай бұрын
Chris, Can you copy the Rubik's Cube and make a video of it.
@CodinginPublic11 ай бұрын
I wish! That's probably more complicated than I could neatly explain. Guessing ThreeJS?
@ahsanhabibasha690610 ай бұрын
Thank you so much for telling me. I will try this framework to make this project.@@CodinginPublic
@Goku-xm1gq Жыл бұрын
Can you tell me one thing, isn't storing apikey on.env on the browser side is risky? i mean .env will rendered as string , if someone looked at source, right ? What is preferred way of making it opsec safe ?
@digletwithn Жыл бұрын
Everything that should be private shouldn't be, in any way, in the client code. You might need to make a server that makes the api calls for you
@IainSimmons Жыл бұрын
It's not in the browser. Astro is server first, and those API endpoints he's making are all server side, and only return JSON in the response
@CodinginPublic Жыл бұрын
As Iain mentioned (and I may not have been clear enough) the API endpoint is server -only. And Vite protects you from exposing keys by forcing you to name client-side keys as PUBLIC_{KEYNAME}. Hope that helps!
@Goku-xm1gq Жыл бұрын
@@CodinginPublic One more thing thats vite specific ... so I tried with vite app and named .env keys as VITE_APP_{}. I see that as rendered string and their docs says if you write it like this it will not leak anything.
@digletwithn Жыл бұрын
@@CodinginPublic Btw maybe you know if there's any reason to go from SendGrid to Resend? Pricing is exactly the same and I do not have any problems with SendGrid
@UtonduHezekiah-z9q4 ай бұрын
How do you scan
@CodinginPublic4 ай бұрын
What do you mean?
@abacuswithrehan264 Жыл бұрын
Awesome Video, Astro looks interesting as a Next.ts Dev, BTW how did you got the object shown in vscode when it's logged in console 👀
@CodinginPublic Жыл бұрын
Glad you enjoyed it! Yeah, Astro has a lot of interesting use cases. It’s better at some things than NextJS IMO, but obviously Next has its own strengths. I did a quick 20 crash course a while back that still holds up here: kzbin.info/www/bejne/sKOzh4ecbJtkhas Console log is an extension called Turbo console log.
@rubenzafratraver6819 Жыл бұрын
One unrelated question (a bit). How would you approach an astro project that requires animatios with gsap or framer motion? Would that just ship the HTML static and then ship the necessary js even if its on the layout component? Like doesnt that mess up with the Astro idea? I really want to use astro but Im a bit afraid that this is working against me, thanks!! Love your videos btw!!!
@CodinginPublic Жыл бұрын
Yeah, that would work! Just set it up like you would in a static HTML site. That's what I'd do :)
@V1kToo Жыл бұрын
Is this just for React?
@CodinginPublic Жыл бұрын
React email is. But resend is for any rendered HTML.
@FilledStacks Жыл бұрын
this looks dope!
@CodinginPublic Жыл бұрын
I’ve really enjoyed it!
@humbulanimunyai9981 Жыл бұрын
This awesome
@rhbvkleef11 ай бұрын
I still don't understand why so many people are opposed to just sending an email over SMTP. It's not that hard.
@CodinginPublic9 ай бұрын
I didn't really outline this in the video, but Resend takes care of a bunch of other items as well like DKIM, the new Google and Yahoo email policies, etc. So your emails are much more likely to land in people’s inboxes without a bunch of work on your part. You can also use SMTP with Resend. But if you have another solution, no worries. Cheers!
@JR-mk6ow Жыл бұрын
React Email is "ok" now? I've started using it (it had like 8k stars on GH already) and it wasn't that good: Fonts didn't work, the Column component was to be used inside a Column (and there was/is no documentation about it). Everything was so badly polished that I end up re-writing most of the rendered / components. It wasn't that good honestly.
@CodinginPublic Жыл бұрын
I should have mentioned that it's still in beta. I agree that it could be better, but transparently I haven't used a lot of the other email systems :)
@מתןללוש Жыл бұрын
Bro, the cube awesome, 😎, Threejs ?
@CodinginPublic Жыл бұрын
Idk. It’s pretty cool though!
@מתןללוש Жыл бұрын
@@CodinginPublic love your work ❤️, astro js awesome videos thanks 🙏
@shreyassk151510 ай бұрын
Is it free?
@CodinginPublic10 ай бұрын
There’s a generous free tier!
@bugged121211 ай бұрын
Meh, sending email has never been an issue, this does not look any different from Postmark or sendgrid or any of the services out there. The pain point has always been being able to create an email template that works in all the email clients. If one is just going to use react email, then one could send an email from any service including just from node.
@CodinginPublic9 ай бұрын
I didn’t really feature this in the video, but the resend takes care of DKIM and a bunch of other email domain requirements for sending emails that actually land in people’s inboxes. The new broadcast feature also adds appropriate headers that Google and yahoo now require (new requirements in the last couple of months). Again, you can roll your own, but I’m happy to use resend so I don’t have to. I agree that templating is the worst tho! Ha
@_nom_ Жыл бұрын
There's always been easier ways. They just cost.
@CodinginPublic Жыл бұрын
Fair enough :)
@jordixboy Жыл бұрын
another overpriced saas that wont exist in 1-2 years.
@CodinginPublic Жыл бұрын
We’ll see. Time will tell! I’m really enjoying it!
@iWhacko Жыл бұрын
if you need a tool like this then take some more programming lessons. The "problem" this tool is trying to solve is non-existent. It's ridiculously easy to send emails in most languages, even with templating engines. instead of static html. also I see some blatant security issues here.
@CodinginPublic Жыл бұрын
You may not be willing to, but I'd encourage you to look more into what Resend is offering. I focused on the sending of emails here, but the easy-of-use is actually in how they help you quickly configure your domain to avoid spam filters, DKIM, etc. And as to the security issues, like I mentioned in the video, you'd want to put this all behind auth, etc.