astro-tips.dev icon indicating copy to clipboard operation
astro-tips.dev copied to clipboard

New tip: send emails with

Open florian-lefebvre opened this issue 2 years ago • 10 comments

florian-lefebvre avatar Dec 01 '23 09:12 florian-lefebvre

I did write this

https://oliverspeir.dev/garden/nodemailer/

might be somewhat useful, it's kind of a mess and I've been meaning to polish it up.

It's lacking the (adapter specific) server/hybrid approach of not having the serverless function be separate but instead an api endpoint ( only works on vercel and netlify serverless )

Could be useful to whoever takes on this issue though

OliverSpeir avatar Mar 16 '24 21:03 OliverSpeir

Maybe this tip could be reworked as: "Sending emails with Astro". Then we could add several popular methods: yours, nodemailer, resend (I have something ready already) etc

florian-lefebvre avatar Mar 17 '24 10:03 florian-lefebvre

"Sending emails with Astro"

I like that idea. That would maybe allow use to keep sections the same, and then use maybe something like a tab component to allow the user to switch between solutions 🤔

alexanderniebuhr avatar Mar 17 '24 18:03 alexanderniebuhr

Either this or one h2 per tech + same substeps (if possible) for each. If we go the tabs way, it would be great that switching one tab switches all of them (eg. You select resend at first, you want all the tabs to be for resend)

florian-lefebvre avatar Mar 17 '24 19:03 florian-lefebvre

From the UX perspective, I'd definitely prefer the tab solution (or something similar e.g. https://moonrepo.dev/docs/setup-toolchain, has a select drop-down in the top-right)

But if that is to complex to implement for now I also think headings could also work.

alexanderniebuhr avatar Mar 18 '24 07:03 alexanderniebuhr

Let's ask the experts! @HiDeoo @TheOtterlord how hard is it to have synced tabs as explained in https://github.com/astrolicious/astro-tips.dev/issues/15#issuecomment-2002584472 ? Do you have such thing on Astro docs? Do you think one pattern is better than another and why?

florian-lefebvre avatar Mar 18 '24 08:03 florian-lefebvre

I just checked this https://docs.astro.build/en/install/auto/ and it seems like if I choose a package manager it is changed for the full page

alexanderniebuhr avatar Mar 18 '24 08:03 alexanderniebuhr

Let's ask the experts! @HiDeoo @TheOtterlord how hard is it to have synced tabs as explained in #15 (comment) ? Do you have such thing on Astro docs? Do you think one pattern is better than another and why?

There is a pending PR for it but that will probably not land very soon.

Adding the syncing behavior through a custom component on top of the current Starlight component is not that difficult, that's what the docs are doing for example (ref), same for starlight-package-managers.

HiDeoo avatar Mar 18 '24 08:03 HiDeoo

Gotcha thanks a lot!

florian-lefebvre avatar Mar 18 '24 08:03 florian-lefebvre

https://github.com/florian-lefebvre/resend-astro-example/blob/main/QUICKSTART.md

florian-lefebvre avatar May 20 '24 15:05 florian-lefebvre