Skip to content

Emails

Setup

StartKit.AI uses Resend to send emails and manage mailing lists.

If you want to use the magic link authentication then you’ll need to follow this guide. Alternatively you can disable authentication for Example App by adding the following to the bottom of your .env file:

DISABLE_AUTH=1

Sending emails

Signup for Resend, follow their instructions to create an account, and copy your API key.

resend-api-key

Set the API key in your .env file;

RESEND_API_KEY=

Now you need to setup a domain for sending from.

Follow the Resend domain instructions here and enter your sending address in the .env file:

RESEND_SENDING_ADDRESS=

We recommend setting a “from name” before the address so it shows up nicely in your customers email clients. You can do that like this:

RESEND_SENDING_ADDRESS="Danielle from StartKit.AI <hi@startkit.ai>"

You can test your integration by sending a test email with the sendTestEmail() function in /server/helpers/emails.js.

Mailing lists

If you want to add customers to a mailing list you will also need to setup an audience in Resend and copy your audience ID.

resend-audienceid

Add the audience ID to your .env:

RESEND_AUDIENCE_ID=

You can now manage your Resend audience with addUserToMailingList() and removeUserFromMailingList().