๐ Emails & Email Providers
SaaSykit comes with a fully featured email system out of the box, which thanks to Laravel's seamless integrations, allows you to send emails using many major email providers, such as Mailgun, Postmark, Amazon SES.
Emails templates are fully customizable and translatable, and come with simple and clean default templates that are used for the emails that are sent like email verification, password reset, etc.
Email templates use the default brand colors for your application, so it's one less thing to worry about.
Email Providersโ
SaaSykit comes with support for the following email providers out of the box:
- Mailgun
- Postmark
- Amazon SES
- SMTP (works with any SMTP provider)
And you can easily add support for any other email provider by following the Laravel documentation.
Choosing Your Default Email Providerโ
To choose your default email provider, go to the Admin Panel and under "Settings" click on "General Settings", then pick the "Email" tab. You will be redirected to the general settings page.
Heere you can edit the following settings:
- Default Email Provider: The email provider that will be used to send emails.
- Default "From" Email Name: The name that will be used as the "From" name when sending emails.
- Default "From Email Address: The email address that will be used as the "From" email address when sending emails.
Configuring Your Email Providerโ
After selecting your default email provider you need to configure its credentials.
To configure your email provider, go to the Admin Panel and under "Settings" click on "Email Providers". You will be redirected to the email providers page.
Pick the email provider you want to configure then click on "Edit credentials". You will be redirected to the email provider credentials page.
Once done, click on "Save" to save your changes and you're good to go.
Built-in Emailsโ
SaaSykit comes with a set of default email templates that are used for the emails that are sent like email verification, password reset, etc. These emails are being sent at various points in the application. Here is a list of the built-in emails that comes with SaaSykit:
- Email Verification: Sent when a user registers and needs to verify their email address
- User Password Reset: Sent when a user requests a password reset
- User registered: Sent when a user registers
- User subscribed: Sent when a user subscribes to a plan
- Subscription cancelled: Sent when a user cancels their subscription
- Invoice payment failed: Sent when a user's invoice payment fails to remind them to update their payment method
- User ordered successfully: Sent when a user orders a one-time purchase product
- User invited to tenant: Sent when a user is invited to a tenant (only in SaaSykit Tenancy)
Check the events page for more information.
Email Templates & Layoutโ
Email html layout can be a pain to get right, since till this day email clients are not as advanced as web browsers. (you need to style them using html tables for example)
SaaSykit comes with a simple and clean default email template that you can use to send your emails. This template is already styled and is being used in the built-in emails that comes with SaaSykit.
To use the main color of your brand as a tint color in the email template, you need to set the following variable in the config/app.php file:
'email_color_tint' => '#6f27e5',
The email template comes as a Blade component that you can easily customize to fit your needs. You can find the email templates in the resources/views/components/layouts/email.blade.php
and inside the resources/views/emails
directory you will find the email views that are used to send the emails.
Each email view is a Blade component that extends the email template.