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

# Mailjet

> Guide to connect your Mailjet account with SuprSend to send email notifications.

This section is a step by step guide to setup Mailjet as your email service provider You can use your existing Mailjet account to integrate, or create a new account from [here](https://app.mailjet.com/signup?lang=en_US)

## Mailjet integration on SuprSend account

On the SuprSend dashboard, go to vendor page from side panel and click Email -> Mailjet from the list of Vendors. This will open vendor details page as shown below:

<Frame>
  <img src="https://mintcdn.com/suprsend/JOwfEC79k-vs3tUR/images/docs/8863183-image.png?fit=max&auto=format&n=JOwfEC79k-vs3tUR&q=85&s=04fcaf3dfa13d50209481bbee1641a15" width="2880" height="1461" data-path="images/docs/8863183-image.png" />
</Frame>

| Form Field             | Description                                                                                                                                                                                                                                                                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Nickname               | You can give any name which may help you to identify this account easily                                                                                                                                                                                                                                                                                |
| API Key                | You will get from the API Key management section in your Mailjet account settings. This is a mandatory field. SuprSend will use this key to route emails through your Mailjet account. Check the [documentation](/docs/postmark#how-to-get-a-server-token-from-postmark) on how to get your API and Secret Key.                                         |
| Secret Key             | Secret generate along with your API Key. You will get this from API Key management section in your Mailjet account settings. This is a mandatory field. SuprSend will use this token to route emails through your Mailjet account. Check [documentation](/docs/postmark#how-to-get-a-server-token-from-postmark) on how to get your API and Secret Key. |
| From Name              | Default 'From Name' that email will go from. You can override this in the individual template.  \*e.g. \[[support@suprsend.com](mailto:support@suprsend.com)]]\\                                                                                                                                                                                        |
| From Email             | Default 'From Name' that email will go from. You can override this in the individual template. *e.g. [support@suprsend.com](mailto:support@suprsend.com)* From email domain should be verified by Mailjet.                                                                                                                                              |
| Reply Email            | Default 'Reply To Email id' on which replies are received. You can override this in the individual template.*e.g. [support@suprsend.com](mailto:support@suprsend.com)*                                                                                                                                                                                  |
| Price per notification | This is the amount you pay per email notification to Mailjet. It helps us to calculate, estimate and optimise your cost spent on notifications. We use this cost to set the order of channels in smart routing where routing rule is `optimize on cost`.                                                                                                |

## How to get API and Secret key from Mailjet

<Steps>
  <Step title="Login to your Mailjet account" />

  <Step title="Click on your profile from the top bar and select account settings">
    <Frame>
      <img src="https://mintcdn.com/suprsend/jhGzZpggWCp1KSgu/images/docs/ecb4fd8-image.png?fit=max&auto=format&n=jhGzZpggWCp1KSgu&q=85&s=f663f63edbc41fe1163dbaf999a00041" width="736" height="688" data-path="images/docs/ecb4fd8-image.png" />
    </Frame>
  </Step>

  <Step title="On account Information Page, click on Rest API -> API Key Management">
    <Frame>
      <img src="https://mintcdn.com/suprsend/dnAGb1CmSRGCSyT3/images/docs/4c4dd8e-image.png?fit=max&auto=format&n=dnAGb1CmSRGCSyT3&q=85&s=e2fea1e629453de8a762d38ba66daaae" width="2880" height="1416" data-path="images/docs/4c4dd8e-image.png" />
    </Frame>
  </Step>

  <Step title="Create an API Key">
    On the API Key Management page, you'll get the option to create API Key. Create one if you haven't already or else you can add the existing API Key and Secret in SuprSend vendor form.

    <Frame>
      <img src="https://mintcdn.com/suprsend/JOwfEC79k-vs3tUR/images/docs/8f2e98f-image.png?fit=max&auto=format&n=JOwfEC79k-vs3tUR&q=85&s=017393a3b846906312e6c70f2de75527" width="2152" height="994" data-path="images/docs/8f2e98f-image.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/suprsend/JOwfEC79k-vs3tUR/images/docs/92ef18f-image.png?fit=max&auto=format&n=JOwfEC79k-vs3tUR&q=85&s=d5435299e1dea1df733edd7ec09aaa6c" width="1262" height="1006" data-path="images/docs/92ef18f-image.png" />
    </Frame>
  </Step>
</Steps>

## Configuring Open/Click tracking for emails on Mailjet

SuprSend uses webhooks to update notification statuses on delivery, user actions like open/click or the failure scenarios. This allows SuprSend to track notification status in logs and to power analytics. To allow SuprSend to receive these events via webhook, add SuprSend's webhook URL in your Mailjet account.

SuprSend's webhook URL: [`https://hub.suprsend.com/webhook/mailjet/`](https://hub.suprsend.com/webhook/mailjet/)

<Steps>
  <Step title="Go to Mailjet Account Settings Page from the top profile and select Rest API -> Event Notifications (Webhooks)">
    <Frame>
      <img src="https://mintcdn.com/suprsend/JOwfEC79k-vs3tUR/images/docs/955e7d8-image.png?fit=max&auto=format&n=JOwfEC79k-vs3tUR&q=85&s=1c40e912bd16da6b5a03aa2b691fa339" width="2568" height="1292" data-path="images/docs/955e7d8-image.png" />
    </Frame>
  </Step>

  <Step title="On the webhook page, add SuprSend's tracking URL">
    On webhook page, add SuprSend's tracking URL `<https://hub.suprsend.com/webhook/mailjet/>` and apply this URL to all events.

    <Frame>
      <img src="https://mintlify.s3-us-west-1.amazonaws.com/suprsend/images/docs/604d0d5-image.png" />
    </Frame>
  </Step>
</Steps>

## How to add Unsubscription link in email

You can directly add unsubscription link in your email using [`$hosted_preference_url`](/docs/user-preferences#hosted-preference-page) variable in your template. This link directs users to the [SuprSend preference page](/docs/user-preferences). With SuprSend preference setting, you have the flexibility to create multiple notification categories based on the type of notifications. This allows users to opt-out of specific notification categories, providing them with granular control over their preferences compared to other email services where they can only opt-out from all marketing communications at once.

**Why it's important to give unsubscribe option in email?**

First, it is required by the [CAN-Spam Act](https://www.ftc.gov/business-guidance/resources/can-spam-act-compliance-guide-business). Second, if you don’t give them this option, they are more likely to click on the spam complaint button, which will cause more harm than allowing them to unsubscribe. Finally, many ESPs look for unsubscribe links and are more likely to filter your email if they don’t have them.

***
