Docs
Email provider
Email provider
Email provider for the email service
SaaSKits uses Resend as the email provider for the email service.
Resend setup
import { Resend } from "resend"
export const resend = new Resend(process.env.RESEND_API_KEY)
This is the very basic setup for Resend. You can find more information about Resend here.
Changing the email provider
We have provided an extracted method for sending emails. You can change the email provider by changing the sendEmail
method in app/services/email/email.server.ts
.
export const sendEmail = async (
to: string,
subject: string,
react: JSX.Element | string
) => {
/*
Your email provider code here
*/
};
Since, all the emails are sent using the `sendEmail` method, you can change the email provider by changing the `sendEmail` method.