> For the complete documentation index, see [llms.txt](https://docs.acho.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acho.io/app-builder/popular-use-cases/send-an-email-via-mailjet-plugin.md).

# Send an Email via Mailjet Plugin

You can send emails to your users from Acho apps via [Mailjet](https://www.mailjet.com/) Plugin. You'll need a free Mailjet account to use Mailjet send API service.&#x20;

### 1. Find your Mailjet API Key and Secret Key

Go to account setting -> Rest API -> [API Key Management (Primary and Sub-account)](https://app.mailjet.com/account/apikeys) to acquire your api key and secret key.

<figure><img src="/files/6ccd7TeJI7bLIDkjPtwa" alt=""><figcaption></figcaption></figure>

### 2. Create or enter an app[​](https://docs.retool.com/queries/guides/emails#1-create-an-app) <a href="#id-1-create-an-app" id="id-1-create-an-app"></a>

If you haven't created an app yet, [log in Acho](https://app.acho.io/main/apps) and click **Create new Data App**. Create a blank app or start from a template.&#x20;

<figure><img src="/files/5yaVwJGaYlrz1XQtSr55" alt=""><figcaption></figcaption></figure>

### 3.  Install Mailjet service

<figure><img src="/files/fAzfhkvnbKuhQKiM9C4H" alt=""><figcaption></figcaption></figure>

Find [plugin store](/app-builder/app-construction/plugin-store.md) on the side bar, click on Mailjet API, install the API and add to API services. Once it is installed and added to API services, you can find it as an [action](/app-builder/app-construction/interactions/add-an-interaction.md#actions) in API services category.

### 4.  Add an input element and add [action flow](/app-builder/app-construction/interactions.md#action-flow)

Drag an [input](/app-builder/app-construction/elements/form-elements/input.md) element from elements list, and add **event** -> **action** to trigger the Send Email Service.  In this example, I use Press Enter to trigger the action. Then fill all these fields required for sending an email.&#x20;

* apiKey: A string field that requires your API key, which serves as an authentication mechanism for accessing Mailjet's services.&#x20;
* apiSecretKey: A string field for the secret API key that corresponds to your API key, used to enhance security and verify your API requests.&#x20;
* fromEmail: The sender's email address, indicating who the email is being sent from.&#x20;
* fromName: The sender's name or the display name associated with the sender's email address.&#x20;
* toEmail: The recipient's email address, indicating who will receive the email.&#x20;
* toName: The recipient's name or a display name associated with their email address.&#x20;
* subject: A string that holds the subject or topic of the email, conveying the main purpose or content of the message.&#x20;
* textPart: Plain text part of the email's content, which is typically shown when HTML rendering is unavailable.&#x20;
* htmlPart: Used to store the HTML-formatted version of the email's content, enabling rich formatting and styling for the email's appearance.

{% hint style="info" %}
**apiKey**, **apiSecretKey** is what we get from Step 1

The **fromEmail** must be an approved sender connected to your Mailjet account.
{% endhint %}

{% hint style="info" %}
You can use `${event.value}` in **textPart** so that what you entered in input element will be sent as the text part of the email.&#x20;
{% endhint %}

{% hint style="info" %}
You can use a form to collect multiple input and control all these parameters seamlessly. See [Use Custom Form Container to collect user inputs](/app-builder/popular-use-cases/use-custom-form-container-to-collect-user-inputs.md) for details.
{% endhint %}

{% hint style="info" %}
If you want to automate the send email process, consider using an auto-updated Query Node to trigger the **Send an email** action, and use [Action condition](/app-builder/app-construction/interactions/add-conditions-to-interactions.md) to control it.
{% endhint %}

<figure><img src="/files/jAqKuD6W6BtqfMEmRv5X" alt=""><figcaption></figcaption></figure>

### 5. Test&#x20;

Go to [preview](/app-builder/preview.md) to test the interaction. In this example, I used the input value as the text part of the email.\
![](/files/z7JG7lDzwj3ZOVgDCK2e)![](/files/paD6soPHjNbIv8tIqfMV)
