---
title: "E-Mails mit AutoSend senden"
description: "Wie nutzt man AutoSend zum Senden von E-Mails mit LaunchFast Starter Kits?"
source: "https://www.launchfa.st/de/documentation/emails/autosend"
---

> **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.

> Sehen Sie sich den Quellcode [hier](https://github.com/LaunchFast-Boilerplates/launchfa.st-astro/blob/master/src/lib/utils/email.ts) an.

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

LaunchFa.st macht es Ihnen mit seiner integrierten Anbindung leichter, E-Mails mit [AutoSend](https://autosend.com) zu senden.

So richten Sie AutoSend für die Nutzung mit LaunchFast ein:

<Steps>
  1. Erstellen Sie ein [AutoSend](https://autosend.com)-Konto.
  2. Verknüpfen Sie Ihre Domain, indem Sie die Schritte in ihrem [Domain-Leitfaden](https://docs.autosend.com/domain) abschließen.
  3. Holen Sie sich den AutoSend-API-Schlüssel von https://autosend.com/settings/api-key.
  4. Stellen Sie sicher, dass Sie die Umgebungsvariable(n) Ihrer Anwendung gemäß der folgenden Anweisung aktualisieren:
    
      <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>

Um E-Mails mit AutoSend zu senden, verwenden Sie das `sendEmail`-Hilfsprogramm in Ihrem serverseitigen Code:

<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 AutoSend
  // Read more on https://docs.autosend.com/quickstart/email-using-api
  await sendEmail({
    text: context.text,
    subject: context.subject,
    from: 'Rishi Raj Jain <emails@rishi.app>',
    to: typeof context.to === 'string' ? [context.to] : context.to,
  }, 'autosend')
}

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

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

</TabItem>

</Tabs>
