MailJet - How to send test emails


If you have made changes to your MailJet email template, and the sending returns errors such as the one below, it is possible to send test emails within MailJet to try to find the source of the problem.  

A template language occurred when sending a message using Template 3460294: expression parsing error ## Unknown identifier: var:L1Code ## near ## var:L1Code == "GTT" ##


The reason the test has “failed” is  because that the MailJet template has been set up with some  variable codes (requests for information from Odyssey, that determine what text or images MailJet includes when sending the email ).

Here’s what to do for a successful sending of a “test" email in MailJet:

  • In MailJet, Open the template and from the Preview and test button, choose Preview email



  • Select Desktop or Mobile, which determines what the resulting file will look like
  • If you look at the content of email template you can see there are several “variables” and conditions defined.  


  • example of a conditionandexample of a variable
  • example of a condition: {% if var:L1Code == “GTT” % }
  • example of a variable: {{var:FirstName:""}}

In the condition example above, this means, if it’s the Great Taste Trail in the “L1 code”in Odyssey, then insert this information, if it’s the A2O Trail in the “L1 code” in Odyssey, then insert other information etc.  

In the variable example above, this means insert the FirstName field from the record in Odyssey


You can learn more about the codes available for use in Odyssey here:  Https://Support.Myodyssey.App/Article/301-Merge-Tags



To perform the test send

  • To perform a successful “test” of the template, as the template is asking for L1 information,  you need to supply that information before the email can successfully be sent.
  • In the screen shot example below, you will see that we have moved to the left hand side of the screen and entered GTT in the L1Code field.  (1)

This will answer the IF question the template is looking for, what is the L1 field?  

Obviously, this will just produce a test email based on IF the L1Code field is GTT.  To produce test emails for other trails, in this case the A2O, or the WCW, you would need to repeat the process again, with A2O or WCW in the L1Code field.  


Every field needs to have some data in it for this test to work!

  • Then click the Update variables button (2)
  • Then click the Send a test email button (3)

Up to ten email addresses can be sent this test email.  Enter your email address in the field, and click send.

Your test email will then send successfully!!