Variable is not set

In Mailmeteor preview, I get a message "Variable is not set", what does it mean?

In the preview mode, you may sometimes notice a message "We noticed something that you may want to know... {{ variable_name }} variable is not set, it will be left blank in the email."

In the image below, the variable {{company}} is not set, you can see that there is a blank space where it should appear.

Variable is not set warning

If you wish to leave a variable blank, that is completely fine. For example, you may want to include a Post Scriptum for some recipients only. But if you gets this message whereas you wish this variable to appear, here is the solution to this issue.

How to solve Variable is not set?

  1. Make sure uppercase and lowercase match between your headers and your variable name: "Firstname" is not the same as "firstname"

  2. Make sure there is no invisible space left in the cell after your header's name. Click on your column header, and remove all spaces after the header's title.

In column B, there is an invisible space after the header's title

3. Remove formatting on text. Sometimes, when you copy paste an email body into Mailmeteor for example, there can be formatting applied to your email content such as font styling or sizing. You may not notice it in the first place, but this formatting will break your variable HTML. This is why you need to remove formatting by selecting your text and clicking on the "Format clear" icon (a striked trough T icon)

Select text and click on clear formatting

Ensure that your variable name matchs exactly the column header and that no formatting is breaking your variables.

If you still need a helping hand on this, contact us. We'll be glad to help!