Overview
This guide will walk you through creating, rendering, and sending your first email with Better Svelte Email. By the end, you’ll have a working welcome email that looks great across all email clients.Create Your First Email Component
Create a new file for your welcome email component. We’ll use Tailwind CSS for styling, but bare CSS works too.
Render the Email to HTML
Use the The rendered HTML will have:
Renderer class to convert your Svelte component into email-safe HTML.- Tailwind classes converted to inline styles
- Media queries injected into
<head>for responsive design - Email-safe DOCTYPE and structure
The
Renderer class processes Tailwind utilities and outputs production-ready HTML that works across all major email clients.Advanced Configuration
Custom Tailwind Configuration
Extend the default Tailwind theme with your brand colors and custom configuration:text-brand and other custom classes in your email components.
Inject App Theme Styles
Share CSS variables and theme styles between your app and emails:Test Your Email
Visual Preview in Development
Better Svelte Email provides a built-in preview component for development:/preview in your browser to see a live preview with:
- Desktop and mobile views
- Component tree inspector
- HTML and plain text output
- Send test email functionality
Email Preview Guide
Set up the complete email preview environment.
Send Test Emails
Send test emails to yourself before production:What’s Next?
You’ve successfully created, rendered, and sent your first email! Here’s what to explore next:Component Library
Explore all available components and their props.
Rendering Guide
Deep dive into the Renderer API and options.
Tailwind Support
Learn about responsive design and custom classes.
Sending Emails
Best practices for sending emails in production.
Example Templates
Need inspiration? Check out these example templates:- Vercel Invite Email: Team invitation with profile images
- Apple Receipt: Transaction receipt with product details
- Demo Email: Feature showcase with icons and CTAs
Have questions? Check out the GitHub discussions or open an issue.