> ## Documentation Index
> Fetch the complete documentation index at: https://novu-c5de82d9-nv-8794-quote-reply-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Use the email step in Novu Framework to send email notifications with dynamic subject lines, HTML bodies, and React Email templates.

The `email` step allows you to send email notifications to your users. This step supports HTML content and can be used with React Email for building beautiful email templates.

## Example Usage

```tsx theme={null}
await step.email('welcome-email', async () => {
  return {
    subject: 'Welcome to Our Platform',
    body: "Hello and welcome! We're excited to have you on board.",
  };
});
```

## Email Step Output

The object your resolver returns must match the schema below. Any other property is rejected by the Framework's output validation.

| Property            | Type                               | Required | Description                                                                                        |
| ------------------- | ---------------------------------- | -------- | -------------------------------------------------------------------------------------------------- |
| subject             | string                             | Yes      | The subject line of the email.                                                                     |
| body                | string                             | Yes      | The content of the email. Can be plain text or HTML.                                               |
| from                | `{ email: string, name?: string }` | No       | Override the default sender address and display name for this send.                                |
| replyTo             | string                             | No       | Set a Reply-To address for the email.                                                              |
| preheader           | string                             | No       | Preview text shown next to the subject in most inbox clients.                                      |
| useProviderDefaults | boolean                            | No       | When `true`, Novu uses the sender values configured on the email provider instead of the workflow. |

## Sending attachments

Attachments are **not** part of the `email` step output schema. Returning an `attachments` array from your step resolver has no effect and is rejected by the Framework's output validation.

Pass attachments in the workflow **trigger payload** instead, then reference them by name in your email body if needed. Each attachment object needs `file` (Buffer or raw base64 without the `data:<mime>;base64,` prefix), `name`, and `mime`. See [Sending attachments](/platform/integrations/email#sending-attachments) on the Email integrations page for the full field reference, size limits, and language examples.

```ts theme={null}
await novu.trigger({
  workflowId: 'welcome-email',
  to: { subscriberId: 'subscriber_id' },
  payload: {
    attachments: [
      {
        file: fileBuffer, // Buffer or raw base64 string
        name: 'report.pdf',
        mime: 'application/pdf',
      },
    ],
  },
});
```

## Email Step Result

The `email` step does not return any result object.
