# Overview

> Learn how to send emails using the starter kit.

Nuxt Starter Kit includes a simple Nuxt layer that allows you to send emails using [Plunk](https://www.useplunk.com/) or [Resend](https://resend.com/). This layer is located in the `packages/layer-emails` directory and is responsible for managing the email connection, sending emails, and handling errors.

## Nuxt Email Renderer

I use [Nuxt Email Renderer](https://nuxtemail.com) which provides a collection of high-quality, unstyled components for creating emails using Vue and TypeScript. The pre-defined templates are located in the `packages/layer-emails/app/emails/` directory. You can use these templates to create your own emails or modify them to fit your needs.

## Plunk

<tip>

My recommendation is to use a self-hosted version of [Plunk](https://www.useplunk.com/).

</tip>

To enable Plunk, you need to set the following environment variables in your `.env` file:

```bash
NUXT_PRIVATE_EMAIL_PROVIDER=plunk
NUXT_PRIVATE_EMAIL_PLUNK_API_URL=YOUR_API_URL
NUXT_PRIVATE_EMAIL_PLUNK_API_KEY=YOUR_API_KEY
```

## Resend

To enable Resend as email provider, you need to set the following environment variables in your `.env` file:

```bash
NUXT_PRIVATE_EMAIL_PROVIDER=resend
NUXT_PRIVATE_EMAIL_RESEND_API_TOKEN=YOUR_API_KEY
```

## Other Providers

You can easily add support for other email providers by adding a new provider in `packages/layer-emails/server/utils/getEmailProvider.ts`. This file contains the logic for selecting the appropriate email provider based on the configuration. You can add your own provider by creating a new function that implements the `EmailProvider` interface and updating the `getEmailProvider` function to include your new provider.

Checkout [useEmail](https://github.com/SupersaasHQ/useEmail/tree/main/src/services) which includes other email providers like [SendGrid](https://sendgrid.com/) and [Mailgun](https://www.mailgun.com/).
