Emails
Email Setup Documentation
Previously, we used the Resend service to handle emails. However, we moved away from it due to several issues:
Emails often failed to reach the inbox folder due to problems with their SMTP servers.
The free plan had significant limitations, such as allowing only one audience and restricting the number of contacts or emails.
To address these issues, we are pleased to introduce a new custom email marketing system integrated into our SaasCore boilerplate.
Benefits of the New System
Unlimited Emails: Send as many emails as you want.
Unlimited Audiences: Create unlimited audience groups.
Automation: Send automated emails effortlessly.
Flexible SMTP Options: Use any SMTP server you prefer, such as Zoho Mail, SendGrid, or even Resend (if desired).
Setup Instructions
Using Zoho Mail for SMTP
Personally, I use the free professional Zoho Mail plan to quickly create new emails for every SaaS project I launch.
Configuration for Zoho Mail:
To configure:
Enter your Zoho email and password into the
SMTP_USER
andSMTP_PASSWORD
fields.That's it! Your email setup is ready to go.
Adding Audiences and Managing Emails
In the configuration file, there's a customAudiences
property that allows you to manage audiences.
Steps to Add a New Audience:
During setup, create a new audience in the Audiences section of the admin panel.
Each audience created will have a unique ID. This ID is required to programmatically add emails to the specific audience.
Example configuration in the code:
Example: Adding Emails to "Blog newsletter" Audience
Create a new audience named "Blog Newsletter" in the admin panel.
Copy the unique audience ID and paste it into the configuration file under
newsletterAudienceId
.When prospects submit their emails through the
newsletter subscription
component, they will automatically be added to this audience using theaddToCustomAudience
utility function.
Utility function implementation we use:
Usage Example:
We call the addToCustomAudience
function as follows: (In the case of potential clients, this function is triggered whenever a client enters their email into the emails collector component.)
Unlimited Audiences and Flexibility
You can repeat this process to create and manage unlimited audiences. Simply add the audience ID to the configuration and use the same flow to manage emails efficiently.
If you have any questions about this setup, feel free to reach out via Discord or email.
Last updated