Drupal Mailjet

Posted : admin On 1/26/2022
  1. Drupal Mailchimp
  2. Drupal Mailgun
  3. Drupal Mail System
  4. Drupal Maillog
  5. Drupal Mail
  6. Drupal Mailhog

To access your Mailjet module’s ‘Contacts’ section, go into ‘Mailjet Settings’ and select the ‘Mailjet’ tab. Then click on ‘Contacts’.

In the Joomla admin, click on ‘Components’ → ‘Mailjet’ → ‘Settings’. You will access the Mailjet Settings section. You need to connect your Mailjet account. Enter your API and Secret keys in the respective fields. Afterwards click on the ‘Save & Close’ to submit the changes.

Give your Drupal email a boost with the Mailjet module for Drupal 7 and 8 allowing you to create, send, track and deliver newsletters and transactional emails directly within your Drupal admin. In the case of Drupal Commerce, you will also have the ability to send triggered marketing emails (abandoned cart, purchase anniversary, etc.). Take advantage of our latest features to manage and segment contacts base. Not working for you? See Troubleshooting Git clone.Once it works, you need the Git deploy module. See Versioned dependencies and Git for an explanation. Routinely The headings below are not sequential. What you choose to do depends on where you are in your process. Set up the Drupal trigger, and make magic happen automatically in Mailjet. Zapier's automation tools make it easy to connect Drupal and Mailjet.

How to Manage Your Drupal Contacts¶

When you configure Drupal to send emails through Mailjet, all of your contacts will automatically be transferred to a Mailjet contact list called ‘Drupal Contact List’. The list will be continuously updated when new contacts are added in Drupal.

You are also able to configure Mailjet to automatically update your contact list whenever a Drupal contact unsubscribes from your mailing lists. To do that, please check our section on Event Tracking.

How to Manage Your Mailjet Contact Lists¶

To send out your marketing campaigns with Mailjet, you need to use contact lists that contain the contact details of all the subscribers you want to reach. You can use these contact details to further connect with your customers with email personalization, tailoring each email sent within a campaign to make your users feel unique and important.

Here you will see a list of all the contact lists you currently have on your Mailjet account. If any contacts were automatically migrated, you will also see a newly created contact list. If you have no contact lists, the area will be empty.

In this section you will be able to create, edit, duplicate, archive and delete your contact lists. You can also create new contact properties, or add emails to your Campaign Exclusion List.

For detailed information please visit our dedicated guide on Managing your contact lists.

Contact Properties¶

To store details about your subscribers (name, age, city, …) in your Mailjet contact list, you need to define/create the different contact properties you wish to associate with your Mailjet contacts. Once defined, you can then import your contact list details and map them to the relevant contact properties on the Mailjet side.

The inclusion of additional details regarding your subscribers will help you with personalizing emails in Mailjet, or with segmentation of the contact list for marketing campaigns, for example.

For more information on how to manage the properties, please visit the Contact Properties section of our guide on Managing Contact Lists.

General Information¶

Do you want an easy way of allowing your customers to sign up for different marketing newsletters? You can do it by using the Mailjet Subscription Form creation tool included in our module.

Set up the form by choosing the information you will collect, the contact list to add the users to, how and where the form is displayed, which customers can see it, etc.

Setting Up Multiple Subscription Forms¶

You have the option to create more than one Subscription Form.


This way, for example, you can create a form specifically for your Sales contacts, which will be located only on a designated page, and will be visible to customers with the respective user role. On the other hand, a standard form can be used to subscribe your regular customers to your weekly marketing campaign contact list, available in the footer of all pages and visible by all users.

How to Create a Mailjet Subscription Form¶

Go into ‘Mailjet Settings’ and select the ‘Signup Settings’ tab. Then click on ‘Add Subscription form’.

You are now in the Subscription Form configuration page. Let’s take a look at the options presented to you.

Title and Description¶

Enter a Title for your subscription form. It will be displayed internally in your list of forms.

In addition, it will be the default form title to be displayed on your website. You can change or remove it when you configure the block display.

The ‘Description’ field allows you to enter a short explanation of the purpose of the form. This is optional - if entered, the description will be displayed on your website below the title.

Form Settings¶

Drupal Mailchimp

  • ‘Submit Button Label’ - Enter the text that will be displayed on your ‘Subscribe’ button. Filling in this field is mandatory.
  • ‘Form destination page’ - You can enter an address for a landing page after subscription - e.g. a page with information on how to complete the subscription process or a “Thank you!” page. If you leave it blank, after clicking on ‘Subscribe’ the user will remain on the same page.
Drupal Mailjet

Subscription Confirmation Email¶

After clicking on the ‘Subscribe’ button, users will be sent an automatic email, requiring them to confirm the subscription. This email will always include several pieces of information that cannot be removed:

  1. The URL of the website that contains the subscription form.
  2. A button for completing the subscription process, linking to a confirmation URL.
  3. The confirmation URL itself, so users can copy-paste it in the address bar of their web browsers.

The rest of the email content can be edited by using the ‘Subscription Confirmation Email’ fields:

If you do not enter any information, the default text for the respective field will be displayed.

  • Email Heading Text - Will be displayed above the website URL and subscription confirmation button.

    Default Text

    Please Confirm Your Subscription To

  • Email Confirmation Button Text - Will be displayed on the subscription confirmation button.

    Default Text

    “Click Here to Confirm”.

  • Email Body Text - Will be displayed between the button and the subscription link in the email.

    Default Text

    “You may copy/paste this link into your browser:”.

  • Thanks,… - Used for the end of the email, before the signature.

    Default Text


  • Owner - the email signature. Usually you would put your company / website name here.

    Default Text


  • Email Footer Text - the information you want displayed after the subscription confirmation link.

    Default Text

    “Did not ask to subscribe to this list? Or maybe you have changed your mind? Then simply ignore this email and you will not be subscribed”.

Here is an example of a customized subscription confirmation email.

Confirmation and Error Messages¶

These are the messages your users might receive when attempting to use the subscription form.

  • Confirmation Message - will be shown after a user clicks on the Subscribe button and the subscription confirmation email is sent successfully. You can use the % symbol to include the email address in the message.

    Default Text

    Subscription confirmation email sent to %. Please check your inbox and confirm the subscription.

  • Error. Token verification failed - appears when a user tries to subscribe, but there is an issue with your Mailjet credentials.

    Default Text

    Error. Token verification failed

  • Data type mismatch error - will be displayed whenever a user enters data in an incorrect format in one of the form fields. For example, you ask users to submit their age in one of the fields, so they need to enter a number, but instead they enter text. %id can be used to show the field label with the incorrect data format.

    Default Text

    Incorrect data format. Please enter the correct values according to the example of the description in the field: <%id>

  • Subscribe error. Please try again later! - If there was any kind of issue with the form submission, the user will see this error message.

    Default Text

    Subscribe error. Please try again later!

  • The contact % is already subscribed - If the user is already subscribed, this message will be displayed. The % symbol is used to include the email address in the error message.

  • “Thanks for subscribing… ” message - Once the user clicks on the button in the confirmation email and completes the subscription process, this message will be displayed on the landing page.

    Default Text

    You have subscribed successfully! Thank you!

Mailjet List Selection & Configuration¶

Select the Mailjet contact list the users will be subscribed to, and add fields for the Mailjet contact properties you want included as part of the subscription form.

First, simply choose the contact list from the drop-down menu.


You can create new contact lists in the Contacts section of the Mailjet module - go to ‘Mailjet Settings’ → ‘Mailjet’ → ‘Contacts’ → ‘Create new contact list’.

Afterwards select the contact properties you want included in the form. You can choose up to three properties - each selected one will appear as an additional field in the subscription form. All of the fields will be mandatory.

Add JavaScript and CSS Code¶

You can enter JavaScript and/or CSS code in the respective fields to modify your form design.

Machine Name¶

Every Subscription Form you create will be automatically assigned a Machine Name - an unique ID you can use for scripts you create. You can see it here.

Create Subscription Form¶

Lastly, click on ‘Create Subscription Form’ to create the form.


Edit Subscription Form¶

Once a form has been created, it will appear in the ‘Signup Settings’ main page. Click on ‘Edit’ to make changes to it, if needed.

Once you have edited the settings you wanted, click on ‘Edit Subscription Form’ to enact the changes you have made.

Edit Field Labels¶

While editing your form, you have the option to add or change the labels for the different form fields.

This is done by clicking on the ‘Edit Labels’ button.

In our example, we have 3 fields - for first name, last name and email address.

The labels you select will appear above their respective fields. If no label has been selected, nothing will be displayed.

Click on ‘Save’ to submit any changes you have made.

Delete Subscription Form¶

If you do not need a form you have created anymore, you can easily delete it. Simply go to the ‘Signup Settings’ tab of the Mailjet Module, click on the arrow next to the ‘Edit’ button and select the ‘Delete’ option.

Alternatively, if you are editing the form, click on ‘Delete’ at the bottom of the page to remove the form.

How to Publish a Subscription Form¶

You have successfully created your subscription form. Now is the time to publish it - choose where it will be displayed on your site, who is able to see it etc.

Drupal Mailgun

Drupal Mailjet

Clear Drupal Cache¶

You need to clear the cache in Drupal, before your subscription form becomes visible in the necessary menus. Similarly, a deleted form will be removed from the respective menus only after you clear the cache in Drupal after deletion.

To do that, go to the ‘Configuration’ section and under ‘Development’ click on ‘Performance’.

Afterwards click on ‘Clear all caches’.

Use Blocks to Publish a Subscription Form¶

Now that you have cleared the cache in Drupal, from the admin dashboard select ‘Structure’ and then choose the ‘Block layout’ option.

Blocks are boxes of content rendered into an area, or region, of a web page - e.g. your header, footer, sidebar etc.


For detailed information on the Blocks functionalities, please visit Drupal’s ‘Working with Blocks’ guide.

From the main Blocks menu you can see all of the areas / regions a block may occupy, as well as the blocks assigned to the respective regions. The number of regions depends on the theme you are using.

To activate a subscription form block, first choose the region you want to place it in, then click on ‘Place block’ next to it.

Drupal Mail System

Afterwards select it from the pop-in window by using the ‘Place block’ button.

Drupal Maillog

You then have the option to configure the subscription form block. Click on ‘Save block’, when you are ready.

Drupal Mail

Configure your Subscription Form Block¶

By clicking on ‘Configure’ next to the form block you are able to define where the form is displayed on your website, and which users can see it.

Select Block Title¶

The information entered here overwrites the title you selected for your form. This way you can use a technical name for your convenience as a Form Title, and choose a Block Title more suitable for your customers.

Visibility Settings¶

Customize on which pages - and for whom - the sub form will be visible.

  • Content Types - if your pages are marked with a specific type, you can select the types, for which the form will appear. If none are selected, no restriction based on types will be implemented.

    How do I create different content types in Drupal?

    Please visit Drupal’s Content Types Guide for more information.

  • Pages - select either the pages, where it will be visible, or the ones where it is not.

  • Roles - This gives you the opportunity to choose the customer roles, for which the sub form will be visible. For example, if you have VIP users and want to create a sub form only visible by such users, you can use these restrictions.

    How do I create different user roles in Drupal?

    Please visit Drupal’s Guide to Managing User Roles for additional information.

Region Settings¶

Similarly to selecting the region when publishing the form, you can use the region settings to choose where your sub form will be displayed.

Drupal Mailhog

Remember to click on ‘Save block’ to save your settings!