(FINALLY!) Email for Developers

Поділитися
Вставка
  • Опубліковано 3 жов 2024

КОМЕНТАРІ • 114

  • @simonswiss
    @simonswiss 10 місяців тому +5

    You are absolutely KILLING IT with this UA-cam channel - learning so much from you 🙏🙏🙏

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      Simon! That means so much coming from you. Thanks, man! Now I just finally need to get around to doing some Keystatic content! 😉

  • @7doors847
    @7doors847 10 місяців тому +8

    Chris, you’re still going strong, that’s awesome to see.
    Very well deserved.

  • @latch909
    @latch909 10 місяців тому +3

    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
      @CodinginPublic  10 місяців тому

      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.

  • @teinett
    @teinett 10 місяців тому +1

    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
      @CodinginPublic  10 місяців тому

      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!

  • @dvzz7397
    @dvzz7397 Місяць тому +1

    Guys, if you are using hybrid in the output, remember to put "export const prerender = false" in the endpoint.

  • @otisrancko
    @otisrancko 10 місяців тому

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

  • @jitxhere
    @jitxhere 10 місяців тому +1

    Wow Chris Awesome explanation. Resend does solve a lot of issue.

    • @CodinginPublic
      @CodinginPublic  10 місяців тому

      Glad you enjoyed it! Resend is 🔥!

  • @gstreetgames2530
    @gstreetgames2530 10 місяців тому +12

    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!

    • @abhimohan4356
      @abhimohan4356 10 місяців тому

      Lol? Google Outreach, and think about why an email client would be worth over 4 billion dollars.

    • @CodinginPublic
      @CodinginPublic  10 місяців тому

      Ha, sounds like you have a lot more dev experience than me :)

    • @Action2me
      @Action2me 10 місяців тому

      That sounds like sarcasm. Is it? Because honestly I wholeheartedly agree with this comment if it’s sincere.

    • @TheGuillotineKing
      @TheGuillotineKing 10 місяців тому

      It's obviously sarcasm

    • @p0xygen
      @p0xygen 8 місяців тому

      @@CodinginPublic Yeah sounds like he does

  • @adnanamin3666
    @adnanamin3666 10 місяців тому +4

    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?

  • @elieobeid77
    @elieobeid77 10 місяців тому +51

    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
      @iKyroja 10 місяців тому +2

      True, nothing to add here.

    • @matt_hart
      @matt_hart 10 місяців тому +2

      where is he sending emails from the frontend?

    • @aberba
      @aberba 9 місяців тому +1

      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
      @jchiatt4 9 місяців тому

      No one is sending email from the frontend, relax buddy

    • @CodinginPublic
      @CodinginPublic  9 місяців тому +1

      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.

  • @joaooliveirarocha
    @joaooliveirarocha 8 місяців тому

    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

  • @badcatdesign
    @badcatdesign 10 місяців тому +1

    Email is hard. You make this look easy. I'll still stick with MJML though - "slightly less" setup :)

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      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
      @badcatdesign 10 місяців тому

      @@CodinginPublic Clunky is kind. But there's 100% less setup time which is a plus for me.

  • @abacuswithrehan264
    @abacuswithrehan264 10 місяців тому

    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
      @CodinginPublic  10 місяців тому +1

      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:
      ua-cam.com/video/zrPVTf761OI/v-deo.html
      Console log is an extension called Turbo console log.

  • @finnjenn
    @finnjenn 6 місяців тому

    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?

  • @FilledStacks
    @FilledStacks 10 місяців тому

    this looks dope!

  • @voidbinary
    @voidbinary 9 місяців тому

    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.

  • @amayweather
    @amayweather 9 місяців тому

    Its looks great, i really wait when C# will be added

    • @iWhacko
      @iWhacko 9 місяців тому

      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
      @amayweather 9 місяців тому

      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
      @CodinginPublic  9 місяців тому

      They move fast, so hopefully soon!

  • @rayandedoschevic2884
    @rayandedoschevic2884 9 місяців тому +1

    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?

  • @none4614
    @none4614 9 місяців тому

    Hi Chris. Thanks for your interesring video. Which 3rd parties in your terminal setup ? ❤

    • @CodinginPublic
      @CodinginPublic  9 місяців тому +1

      I use fig.io in VSCode and Warp as my standalone terminal :)

  • @humbulanimunyai9981
    @humbulanimunyai9981 10 місяців тому +1

    This awesome

  • @alexisviscogliosi2785
    @alexisviscogliosi2785 8 місяців тому

    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.

  • @rubenzafratraver6819
    @rubenzafratraver6819 10 місяців тому +2

    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
      @CodinginPublic  9 місяців тому

      Yeah, that would work! Just set it up like you would in a static HTML site. That's what I'd do :)

  • @trashmail-d1q
    @trashmail-d1q 9 місяців тому

    How did you theme your terminal? Any link? And thanks a lot for helping the community.

    • @CodinginPublic
      @CodinginPublic  7 місяців тому

      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.

  • @spacecoder0526
    @spacecoder0526 8 місяців тому +1

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

    • @wojtek6206
      @wojtek6206 8 місяців тому

      I'm facing the same problem. No idea how to fix it 😕 I've also upgraded Astro but it didn't help.

  • @AndresMartinez-se9zl
    @AndresMartinez-se9zl 5 місяців тому

    Would it work with ssg? I just need resend for a contact form.

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

      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.

  • @duckdev9447
    @duckdev9447 8 місяців тому

    Any improvements from nodemailer?

    • @CodinginPublic
      @CodinginPublic  7 місяців тому

      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.

  • @brx-hashcode
    @brx-hashcode 10 місяців тому +1

    Please Chris which Vs Code theme are you using?

    • @CodinginPublic
      @CodinginPublic  10 місяців тому

      Material Palenight High Contrast: marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme

    • @brx-hashcode
      @brx-hashcode 10 місяців тому

      Thank you Chris!

  • @jairo9super4
    @jairo9super4 9 місяців тому

    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
      @CodinginPublic  9 місяців тому

      You'd want to hide this behind authentication before publishing, so that's why I didn't show :)

    • @codebreaker2495
      @codebreaker2495 8 місяців тому

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

  • @ahsanhabibasha6906
    @ahsanhabibasha6906 8 місяців тому

    Chris, Can you copy the Rubik's Cube and make a video of it.

    • @CodinginPublic
      @CodinginPublic  8 місяців тому +1

      I wish! That's probably more complicated than I could neatly explain. Guessing ThreeJS?

    • @ahsanhabibasha6906
      @ahsanhabibasha6906 8 місяців тому

      Thank you so much for telling me. I will try this framework to make this project.@@CodinginPublic

  • @FaizanAnwerAli
    @FaizanAnwerAli 10 місяців тому

    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
      @CodinginPublic  10 місяців тому

      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.

  • @rhbvkleef
    @rhbvkleef 8 місяців тому

    I still don't understand why so many people are opposed to just sending an email over SMTP. It's not that hard.

    • @CodinginPublic
      @CodinginPublic  7 місяців тому

      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!

  • @Zagoorland
    @Zagoorland 9 місяців тому

    what do you use for terminal settings, theme and autocomplete?

    • @CodinginPublic
      @CodinginPublic  9 місяців тому +1

      fig.io in the VScode terminal. I'm using a custom starship prompt. And I use Warp as my standalone terminal. Hope that helps!

  • @UtonduHezekiah-z9q
    @UtonduHezekiah-z9q 2 місяці тому

    How do you scan

  • @guyman8282
    @guyman8282 10 місяців тому

    what font are you using in vscode

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      Cascadia Code (free font by Microsoft)

  • @ricardoduarte442
    @ricardoduarte442 9 місяців тому

    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
      @IainSimmons 9 місяців тому

      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
      @CodinginPublic  9 місяців тому +1

      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.

  • @V1kToo
    @V1kToo 10 місяців тому

    Is this just for React?

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      React email is. But resend is for any rendered HTML.

  • @Goku-xm1gq
    @Goku-xm1gq 10 місяців тому

    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
      @digletwithn 9 місяців тому

      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
      @IainSimmons 9 місяців тому +1

      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
      @CodinginPublic  9 місяців тому +2

      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
      @Goku-xm1gq 9 місяців тому

      @@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
      @digletwithn 9 місяців тому

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

  • @JR-mk6ow
    @JR-mk6ow 9 місяців тому

    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
      @CodinginPublic  9 місяців тому

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

  • @bugged1212
    @bugged1212 8 місяців тому

    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.

    • @CodinginPublic
      @CodinginPublic  7 місяців тому

      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_
    @_nom_ 10 місяців тому +2

    There's always been easier ways. They just cost.

  • @shreyassk1515
    @shreyassk1515 8 місяців тому

    Is it free?

  • @מתןללוש
    @מתןללוש 10 місяців тому

    Bro, the cube awesome, 😎, Threejs ?

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      Idk. It’s pretty cool though!

    • @מתןללוש
      @מתןללוש 10 місяців тому

      @@CodinginPublic love your work ❤️, astro js awesome videos thanks 🙏

  • @jordixboy
    @jordixboy 10 місяців тому +2

    another overpriced saas that wont exist in 1-2 years.

    • @CodinginPublic
      @CodinginPublic  10 місяців тому

      We’ll see. Time will tell! I’m really enjoying it!

  • @iWhacko
    @iWhacko 9 місяців тому

    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
      @CodinginPublic  9 місяців тому

      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.

  • @naked_avocado
    @naked_avocado 10 місяців тому +1

    Didn't understand cos im new to front-end
    But sill awesome

    • @CodinginPublic
      @CodinginPublic  10 місяців тому +1

      Hey, no worries! I moved much faster here than I normally do on my channel, but glad you still enjoyed it! Thanks for saying something!