Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any update as to the maintenance of this? #25

Open
ldmsh opened this issue Oct 31, 2023 · 5 comments
Open

Is there any update as to the maintenance of this? #25

ldmsh opened this issue Oct 31, 2023 · 5 comments

Comments

@ldmsh
Copy link

ldmsh commented Oct 31, 2023

Thanks

@TomRadford
Copy link

TomRadford commented Jan 11, 2024

Hello!

I'm sure, like me, many of you were looking for a tasty solution for generating emails in your SvelteKit app...
While, sadly, this project seems to be on the back burner, I just wanted to flag that you can use https://github.com/resend/react-email in your SvelteKit project - I ended up opting for it recently and honestly, it was such a pleasure:
Install the packages + React:
npm i react-email @react-email/render @react-email/components react

  • types if you need: npm i -D @types/react

and then in your +page.server.ts or wherever else server-side:

import { render } from '@react-email/render';
// Import your TSX email component
import MyEmailComponent from '$lib/emails/MyEmailComponent';
// Other stuff
const emailHtml = render(
				MyEmailComponent({ message: 'Hello from SvelteKit!'})
			);
// Send with Sendgrid or whatever you like, at this point output is the same as this package

It does mean that you have to write your email templates in JSX but other than that it's a pretty good compromise to make for a more actively maintained project (with Tailwind support woohoo!).

I think the first prize is to hop on to maintaining this project, but I believe the above is an interim solution.

@cmjoseph07
Copy link

Hello all, I have decided to fork the project and maintain it as various people have been asking for updates on the project. I have updated the package and ARIA issues thus far and will see what the community wants in regards to future changes. I hope this is not stepping on the author's project as I love it and have enjoyed using it. If the author returns I would not mind archiving the fork either.

For now, if you want to have these two previously mentioned alerts disappear and work on other issues please check-out:

https://github.com/cmjoseph07/svelty-email

@drjamesj
Copy link

Thanks for taking over @cmjoseph07 I'd also like to contribute if you need or if the original author returns. Thanks

@cmjoseph07
Copy link

@drjamesj

Feel free to jump on any issues you see fit here that you feel comfortable working on and make a pull request on, I plan on starting to tackle some of this stuff this weekend and if there is anything I missed please let me know:

https://github.com/cmjoseph07/svelty-email

List of known issues/request:

1. Error: Component.render(...) is no longer valid in Svelte 5 (#34)

2. render and styleToString exports need file types (#28)

---------------------------------- REQUEST ----------------------------------

1. White Container background (#32)

  • Change Request: Update Container default background
  • Reasoning: To update bg on !important is required, no default to avoid (maybe? | needs testing)

2. Tailwind Support (#16)

  • Change Request: Allow ability to pass tw classes to components
  • Reasoning: Avoid end-users having to switch from TW to CSS in their project and cause styling confusion

3. Preview component maximum text length - RangeError: Invalid count value (#14)

@cowboycodr
Copy link

cowboycodr commented Apr 4, 2024

Hello!

I'm sure, like me, many of you were looking for a tasty solution for generating emails in your SvelteKit app... While, sadly, this project seems to be on the back burner, I just wanted to flag that you can use https://github.com/resend/react-email in your SvelteKit project - I ended up opting for it recently and honestly, it was such a pleasure: Install the packages + React: npm i react-email @react-email/render @react-email/components react

  • types if you need: npm i -D @types/react

and then in your +page.server.ts or wherever else server-side:

import { render } from '@react-email/render';
// Import your TSX email component
import MyEmailComponent from '$lib/emails/MyEmailComponent';
// Other stuff
const emailHtml = render(
				MyEmailComponent({ message: 'Hello from SvelteKit!'})
			);
// Send with Sendgrid or whatever you like, at this point output is the same as this package

It does mean that you have to write your email templates in JSX but other than that it's a pretty good compromise to make for a more actively maintained project (with Tailwind support woohoo!).

I think the first prize is to hop on to maintaining this project, but I believe the above is an interim solution.

Is there a demo repo anywhere showcasing this? Seems like a nice solution. @TomRadford

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants