---
title: "Send Emails in Nuxt with Plunk or Resend"
description: "Send transactional emails from your Nuxt app with Plunk or Resend, build templates with Nuxt Email Renderer and use the useEmail() helpers on the server."
canonical_url: "https://nuxtstarterkit.com/docs/emails"
---

> Index of every page on this site: [llms.txt](https://nuxtstarterkit.com/llms.txt)

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 `apps/web/layers/emails` 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 `apps/web/layers/emails/app/emails/`. You can use these templates to create your own emails or modify them to fit your needs.

Any layer can bring its own templates in an `app/emails/` folder. The waitlist layer, for example, has `WaitlistConfirmation.vue`.

## Sending Emails

On the server, `useEmail()` has helpers for the built-in emails (`sendVerificationEmail`, `sendPasswordResetEmail`, `sendContactSubmissionEmail`) and `sendTemplate()` for any other template:

```ts
await useEmail().sendTemplate({
  props: { name: user.name },
  subject: 'Welcome!',
  template: 'Welcome', // a component in any app/emails/ folder
  to: user.email,
})
```

In development, emails are only logged unless you set `NUXT_PRIVATE_EMAIL_SEND_IN_DEV_MODE=true`.

Two values are required: `NUXT_PRIVATE_FROM_EMAIL` (sender of all emails) and `NUXT_PRIVATE_EMAIL_CONTACT` (receives contact form submissions).

## 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 `apps/web/.env`:

```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 `apps/web/.env`:

```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 `apps/web/layers/emails/server/providers/` and selecting it in `apps/web/layers/emails/server/utils/getEmailProvider.ts`. A provider implements the `EmailProvider` interface. Add the new provider name to the `emailProvider` enum in `apps/web/layers/emails/nuxt.config.ts`.

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/).

## Sitemap

See the full [sitemap](https://nuxtstarterkit.com/sitemap.md) for all pages.
