---
title: "Enviar correos con Resend"
description: "¿Cómo usar Resend para enviar correos con los starter kits de LaunchFast?"
source: "https://www.launchfa.st/es/documentation/emails/resend"
---

> **Site index for agents**
> Fetch https://www.launchfa.st/llms.txt to discover every page on this site.
> Every page is also available as Markdown by appending `.md` to its URL.

> Consulta el código fuente [aquí](https://github.com/LaunchFast-Boilerplates/launchfa.st-astro/blob/master/src/lib/utils/email.ts).

import { Steps, Tabs, TabItem } from '@astrojs/starlight/components'

LaunchFa.st te facilita enviar correos con [Resend](https://resend.com) gracias a su integración incorporada.

Así es como configurarías Resend para usarlo con LaunchFast:

<Steps>
  1. Crea una cuenta de [Resend](https://resend.com/home).
  2. Vincula tu dominio completando los pasos de su [guía de dominios](https://resend.com/docs/dashboard/domains/introduction).
  3. Obtén la clave de API de Resend en https://resend.com/api-keys.
  4. Asegúrate de actualizar la(s) variable(s) de entorno de tu aplicación según la siguiente instrucción:
    
      <Tabs>
        <TabItem label="Astro">
            [https://github.com/LaunchFast-Boilerplates/launchfa.st-astro#email](https://github.com/LaunchFast-Boilerplates/launchfa.st-astro#email)
        </TabItem>
        <TabItem label="SvelteKit">
            [https://github.com/LaunchFast-Boilerplates/launchfa.st-sveltekit#email](https://github.com/LaunchFast-Boilerplates/launchfa.st-sveltekit#email)
        </TabItem>
        <TabItem label="Next.js">
            [https://github.com/LaunchFast-Boilerplates/launchfa.st-nextjs#email](https://github.com/LaunchFast-Boilerplates/launchfa.st-nextjs#email)
        </TabItem>
      </Tabs>
</Steps>

Para enviar correos con Resend, usa la utilidad `sendEmail` dentro de tu código del lado del servidor:

<Tabs>

<TabItem label="Astro">

```typescript
// File: src/pages/api/random.ts

import { sendEmail } from '@/lib/utils/email'
import type { APIContext } from 'astro'

export async function GET({ request }: APIContext) {
  // From a server-side API that is being fetched

  // Send an email using Resend
  // Read more on https://resend.com/docs/api-reference/emails/send-email
  await sendEmail({
    text: context.text,
    subject: context.subject,
    from: 'Rishi Raj Jain <emails@rishi.app>',
    to: typeof context.to === 'string' ? [context.to] : context.to,
  }, 'resend')
}

export async function POST({ request }: APIContext) {
  // From a server-side API that is being POST-ed to

  // Send an email using Resend
  // Read more on https://resend.com/docs/api-reference/emails/send-email
  await sendEmail({
    text: context.text,
    subject: context.subject,
    from: 'Rishi Raj Jain <emails@rishi.app>',
    to: typeof context.to === 'string' ? [context.to] : context.to,
  }, 'resend')
}
```

</TabItem>

</Tabs>
