> ## Documentation Index
> Fetch the complete documentation index at: https://v0.x-docs.novu.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Email providers

> Learn the process of configuring email providers with Novu

export const MissingProvider = ({channelName}) => <span>
    Are we missing a provider you'd like to use for {channelName ? channelName : "this"} channel? Please consider adding a new feature request on <a href="https://github.com/novuhq/novu/issues/new?assignees=&amp;labels=feature&amp;projects=&amp;template=feature_request.yml&amp;title=%F0%9F%9A%80+Feature%3A+">github</a> or help us upvoting the existing ones on our public <a href="https://roadmap.novu.co/roadmap">roadmap</a>
  </span>;

Novu can be used to deliver email messages to your customers using a unified delivery API. You can easily integrate your favorite email provider using the built-in integration store.

<iframe src="https://www.loom.com/embed/dbe39c7fc0aa42c8b39bea73d8aee9a4" width="100%" height="400px" frameBorder="0" allowFullScreen />

## Configuring email providers

When creating an email provider integration you will be asked to provide additional fields alongside the provider-specific credentials:

* **Sender name** - Will be displayed as the sender of the message
* **From email address** - Emails sent using Novu will be sent using this address

For some email providers including SendGrid you will have to authenticate the **From email address** to make sure you will send email messages using an authorized address.

## Sending Email Overrides

The overrides field supports an email property. The email overrides field have properties like `to`, `from`, `senderName` etc

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import { Novu } from '@novu/node';

    const novu = new Novu('<NOVU_API_KEY>');

    novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', {
      to: {
        subscriberId: '<SUBSCRIBER_ID>',
      },
      overrides: {
        email: {
          to: ['to@novu.co'],
          from: 'from@novu.co',
          senderName: 'Novu Team',
          text: 'text version of email using overrides',
          replyTo: 'no-reply@novu.co',
          cc: ['1@novu.co'],
          bcc: ['2@novu.co'],
        },
      },
    });
    ```
  </Tab>
</Tabs>

<Note>It's very important to know that Novu merges the `to` field in the email overrides with the subscriber email. It DOES NOT REPLACE IT.</Note>

### Overriding the selected layout

Layout can be selected in the email step editor. To use another layout with emails, selected layout can be overridden using layoutIdentifier in the overrides field.

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import { Novu } from '@novu/node';

    const novu = new Novu('<NOVU_API_KEY>');

    novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', {
      to: {
        subscriberId: '<SUBSCRIBER_ID>',
      },
      overrides: {
        layoutIdentifier: 'layout-identifier-value',
      },
    });
    ```
  </Tab>
</Tabs>

## Sending Email attachments

You can easily send attachments with the Novu API by passing the attachments array when triggering an Email based workflow. Attachment file can either be in the `buffer` or `base64` format.

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import { Novu } from '@novu/node';

    const novu = new Novu('<NOVU_API_KEY>');

    novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', {
      to: {
        subscriberId: '<SUBSCRIBER_ID>',
      },
      payload: {
        attachments: [
          {
            file: fs.readFileSync(__dirname + '/data/novu.jpeg'),
            name: 'novu.jpeg',
            mime: 'image/jpeg',
          },
        ],
      },
    });
    ```
  </Tab>
</Tabs>

## Using different email integration

In Novu integration store, multiple email channel type provider integrations can be active at the same time. But only one  provider integration can be primary at a time. This primary integration will be used as a provider to deliver the email by default. If you want to use a different active provider integration then you can use the `integrationIdentifier` email overrides field.

If there are 4 active email integrations with these identifiers:-

1. sendgrid-abcdef
2. sendgrid-ghijkl
3. brevo-abcdef
4. mailersend-abcdef

Here, if `sendgrid-abcdef` is primary integration and you want to use `brevo-abcdef` with this trigger then you can use `integrationIdentifier` email overrides field as below:-

<Tabs>
  <Tab title="Node.js">
    ```javascript theme={null}
    import { Novu } from '@novu/node';

    const novu = new Novu('<NOVU_API_KEY>');

    novu.trigger('<WORKFLOW_TRIGGER_IDENTIFIER>', {
      to: {
        subscriberId: '<SUBSCRIBER_ID>',
      },
      overrides: {
        email: {
          integrationIdentifier: "brevo-abcdef"
        },
      },
    });
    ```
  </Tab>
</Tabs>

<Info> Integration identifier is similar to Provider identifier but it is different than Provider Id. It is unique for each integration.You can find the `integrationIdentifier` in the integration store page.  </Info>

<Tip>
  <MissingProvider channelName="SMS" />
</Tip>
