Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Using if then else in TO field

  • 2 odgovori
  • 1 ima ovaj problem
  • 59 views
  • Posljednji odgovor poslao ov10fac1

more options

I use Mail Merge frequently. I would like to be able to use and if then else statement in the TO field to select the recipient based on a conditional. I have done this in the past, and had found a reference for doing it but I can no longer find that reference. So if anyone can point me to a site that describes how to to use conditionals in Thunderbird I would appreciate it. Thanks in advance.

I use Mail Merge frequently. I would like to be able to use and if then else statement in the TO field to select the recipient based on a conditional. I have done this in the past, and had found a reference for doing it but I can no longer find that reference. So if anyone can point me to a site that describes how to to use conditionals in Thunderbird I would appreciate it. Thanks in advance.

Izabrano rješenje

Support for the mail merge addon is provided by the author. https://addons.thunderbird.net/en-us/thunderbird/addon/mail-merge/


That page also offers the following advice Variable: {{name}} The variable will be replaced by the value of the field name, e.g.: {{FirstName}}: the variable will be replaced by the value of the field FirstName {{LastName}}: the variable will be replaced by the value of the field LastName {{PrimaryEmail}}: the variable will be replaced by the value of the field PrimaryEmail

Variable: {{name|if|then}} If the value of the field name equals if, then the variable will be replaced by then.

Variable: {{name|if|then|else}} If the value of the field name equals if, then the variable will be replaced by then, else by else.


Variable: {{name|*|if|then|else}} (includes) If the value of the field name includes if, then the variable will be replaced by then, else by else.

Variable: {{name|^|if|then|else}} (starts with) If the value of the field name starts with if, then the variable will be replaced by then, else by else.

Variable: {{name|$|if|then|else}} (ends with) If the value of the field name ends with if, then the variable will be replaced by then, else by else.


Variable: {{name|==|if|then|else}} (equal to) (number) If the value of the field name is equal to if, then the variable will be replaced by then, else by else.

Variable: {{name|>|if|then|else}} (greater than) (number) If the value of the field name is greater than if, then the variable will be replaced by then, else by else.

Variable: {{name|>=|if|then|else}} (greater than or equal to) (number) If the value of the field name is greater than or equal to if, then the variable will be replaced by then, else by else.

Variable: {{name|<|if|then|else}} (less than) (number) If the value of the field name is less than if, then the variable will be replaced by then, else by else.

Variable: {{name|<=|if|then|else}} (less than or equal to) (number) If the value of the field name is less than or equal to if, then the variable will be replaced by then, else by else.


Nested Variables: Variables can be nested. For example: To create individual emails only for your premium customers, you can add something like this in the To field: {{FirstName}} {{LastName}} <{{Premium|x|{{Email}}}}> {{Premium|x|{{Email}}}}


Warning: (Variables in the From / To / Cc / Bcc / Reply fields) Advanced variables like "includes", "starts with" and "ends with" as well as the "numbers" may not work as expected in the From / To / Cc / Bcc / Reply fields!

Pročitajte ovaj odgovor sa objašnjenjem 👍 0

All Replies (2)

more options

Odabrano rješenje

Support for the mail merge addon is provided by the author. https://addons.thunderbird.net/en-us/thunderbird/addon/mail-merge/


That page also offers the following advice Variable: {{name}} The variable will be replaced by the value of the field name, e.g.: {{FirstName}}: the variable will be replaced by the value of the field FirstName {{LastName}}: the variable will be replaced by the value of the field LastName {{PrimaryEmail}}: the variable will be replaced by the value of the field PrimaryEmail

Variable: {{name|if|then}} If the value of the field name equals if, then the variable will be replaced by then.

Variable: {{name|if|then|else}} If the value of the field name equals if, then the variable will be replaced by then, else by else.


Variable: {{name|*|if|then|else}} (includes) If the value of the field name includes if, then the variable will be replaced by then, else by else.

Variable: {{name|^|if|then|else}} (starts with) If the value of the field name starts with if, then the variable will be replaced by then, else by else.

Variable: {{name|$|if|then|else}} (ends with) If the value of the field name ends with if, then the variable will be replaced by then, else by else.


Variable: {{name|==|if|then|else}} (equal to) (number) If the value of the field name is equal to if, then the variable will be replaced by then, else by else.

Variable: {{name|>|if|then|else}} (greater than) (number) If the value of the field name is greater than if, then the variable will be replaced by then, else by else.

Variable: {{name|>=|if|then|else}} (greater than or equal to) (number) If the value of the field name is greater than or equal to if, then the variable will be replaced by then, else by else.

Variable: {{name|<|if|then|else}} (less than) (number) If the value of the field name is less than if, then the variable will be replaced by then, else by else.

Variable: {{name|<=|if|then|else}} (less than or equal to) (number) If the value of the field name is less than or equal to if, then the variable will be replaced by then, else by else.


Nested Variables: Variables can be nested. For example: To create individual emails only for your premium customers, you can add something like this in the To field: {{FirstName}} {{LastName}} <{{Premium|x|{{Email}}}}> {{Premium|x|{{Email}}}}


Warning: (Variables in the From / To / Cc / Bcc / Reply fields) Advanced variables like "includes", "starts with" and "ends with" as well as the "numbers" may not work as expected in the From / To / Cc / Bcc / Reply fields!

more options

Many thanks, that is exactly the page/information I was looking for.