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

# Email sending providers and send policies

> Send through your own Postmark, Mailgun, SendGrid, Amazon SES, SparkPost, Mailjet, Resend or SMTP account, and choose which mail goes where.

Out of the box, your mail goes out through InstantCampaign's platform provider. You can instead connect your own sending account, so mail goes out under **your** account and reputation. Connecting a provider is available on every plan.

Three things work together:

* **Providers** (**Settings → Integrations → Email sending**) are the accounts that can deliver your mail.
* **Delivery routes** (**Settings → Send policies**) are the ways mail can leave the workspace: through a connected provider, or through the platform.
* **Send policies** (**Settings → Send policies**) are named bundles of *kind* (marketing or transactional), *sender profile* and *delivery route*. A send picks a policy.

Only owners and administrators can connect and change providers. Delivery routes and send policies can be changed by anyone whose role has the **Settings: write** permission.

## Supported providers

| Provider                              | What you need                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Postmark**                          | Server API token. Optional: message stream (use a broadcast stream for marketing) and an account API token (only used to list your verified senders).                                                                                                                                                                                                                                                                                                                |
| **Mailgun**                           | Private API key, sending domain (for example `mg.example.com`), region (US/EU). Optional: HTTP webhook signing key.                                                                                                                                                                                                                                                                                                                                                  |
| **SendGrid**                          | API key with Mail Send and Event Webhook access.                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Amazon SES** (your own AWS account) | AWS region, access key ID and secret access key for an IAM user with `ses:SendEmail`, `ses:SendRawEmail`, `ses:GetAccount`, `ses:ListEmailIdentities`, `ses:CreateEmailIdentity`, `ses:GetEmailIdentity`, `ses:CreateConfigurationSet`, `ses:CreateConfigurationSetEventDestination`, `ses:UpdateConfigurationSetEventDestination`, `sns:CreateTopic` and `sns:Subscribe`. Optional: a configuration set. Leave it blank and we create one called `instantcampaign`. |
| **SparkPost**                         | API key with Transmissions, Webhooks and Sending Domains permissions, and a region (US/EU).                                                                                                                                                                                                                                                                                                                                                                          |
| **Mailjet**                           | API key and secret key.                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Resend**                            | API key.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **SMTP**                              | Host, port (587 by default), implicit TLS (port 465), username, password, optional EHLO hostname.                                                                                                                                                                                                                                                                                                                                                                    |

Credentials are stored encrypted. When you edit a provider, leave a secret field blank to keep the saved value.

## Connect a provider

<Steps>
  <Step title="Open Email sending">
    Go to **Settings → Integrations**. Under **Email sending**, click **Connect a provider** (or **Connect another provider**).
  </Step>

  <Step title="Enter credentials">
    Pick the provider, give the connection a name, fill in the fields and click **Connect and test**. A cheap authenticated call confirms the credentials. The card then shows **Connection OK** or the error.
  </Step>

  <Step title="Register delivery webhooks">
    Click **Register webhooks**. This asks the provider to report deliveries, bounces and complaints back to InstantCampaign. The card shows **Registered**, **Manual setup** (copy the secret URL into your provider yourself) or **Not available** (SMTP has no event feed).
  </Step>

  <Step title="Check verified senders">
    Open **Senders** to see the domains and addresses the provider will accept mail from. Sender profiles must match one of these. Verification happens in the provider's own dashboard.
  </Step>

  <Step title="Route mail through it">
    Go to **Settings → Send policies** and point a delivery route (and the policies that use it) at the new provider.
  </Step>
</Steps>

<Warning>
  **SendGrid:** on accounts that support only one event webhook, registering replaces your existing event webhook. If you already use SendGrid's event webhook elsewhere, set it up manually instead.
</Warning>

Use **Test** at any time to re-check the connection, and **Make default** to mark the **Default provider**. The default carries a new workspace's default policies and is pre-selected when you create a route.

### Removing a provider

When you remove a provider, mail routed through it falls back to the platform provider until you point the route somewhere else. Webhooks registered at the provider stop being accepted. The provider stops calling them after a while, or you can delete them in its dashboard.

### What delivery events do

Once webhooks are registered, events from every provider are applied the same way:

| Event       | Effect                                                                                                         |
| ----------- | -------------------------------------------------------------------------------------------------------------- |
| Delivered   | The message is marked delivered.                                                                               |
| Hard bounce | The contact is marked bounced and won't be mailed again.                                                       |
| Soft bounce | Counted. After three soft bounces in a row, the contact is suppressed. A delivery in between resets the count. |
| Complaint   | The contact is marked as complained and suppressed.                                                            |
| Unsubscribe | The contact is unsubscribed.                                                                                   |

You can see these per message in the **Message Log** and manage bounced contacts in **Bounce Management**. See [Email analytics](/guides/sending-and-workspace/email-analytics).

## Send policies and delivery routes

**Settings → Send policies** has two lists.

**Delivery routes.** Each route is one way mail leaves the workspace: a connected provider, or **Platform default (InstantCampaign)**. Mark one route as default to pre-select it for new policies. You can't delete a route while a policy uses it.

**Send policies.** Each policy has a **Name**, **Description**, **Kind**, **Sender profile** (or **Workspace default sender**) and **Delivery route**. The name becomes a key, such as `newsletter-eu`, that the API can use. There's always exactly one default policy per kind, and sends that don't name a policy use the default of their kind.

The **kind** decides the rules:

|                                                  | Marketing | Transactional |
| ------------------------------------------------ | --------- | ------------- |
| Compliance footer and `List-Unsubscribe` headers | Added     | Not added     |
| Recipients who unsubscribed                      | Skipped   | **Delivered** |
| Bounced, complained or erased recipients         | Skipped   | Skipped       |

Transactional mail (receipts, password resets) is owed to the recipient even if they unsubscribed from marketing. Don't use a transactional policy for promotional content.

<Note>
  A policy's kind can't be changed after it's created. To send a different kind of mail, create a new policy. A default policy can't be deleted. Make another policy the default first.
</Note>

### Choosing a policy when you send

Campaigns and journey email steps let you pick a policy. Transactional API calls can name one with the `sendPolicy` field (key or id). An unknown policy is refused rather than silently replaced. If a queued send's policy is deleted before it goes out, the send uses the default policy for its kind.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The connection test fails">
    Re-check the credentials and the permissions listed above. For Mailgun and SparkPost, make sure the region matches your account.
  </Accordion>

  <Accordion title="No senders found">
    Verify a domain in the provider's console first. Some keys, such as a Postmark server token without an account token or a Resend send-only key, can't list senders. In that case, verify the domain under **Settings → Domain Authentication** so sender profiles can use it.
  </Accordion>

  <Accordion title="Bounces aren't showing up">
    Make sure webhooks show **Registered**. For **Manual setup**, copy the secret webhook URL from the card into your provider's webhook settings.
  </Accordion>
</AccordionGroup>
