Currently only available on Google domains.
Email signature templates can be made even more flexible through the use of conditional logic.
The following conditional logic options are available:
This is used to check is a statement if true or false. If the statement is true the proceeding value will be printed, if it's false nothing will be printed unless it's followed by an #else statement (see below).
Multiple statements can be chained together using #elseif, this is used in place of #if for any additional values that need to be checked after the initial #if statement.
This is used to determine what value will be printed if the #if or #elseif statement returns false.
This must be used to delineate the end of a single statement or chain of statements.
Value is equal to.
Value is not equal to.
Value is greater than.
Value is less than.
Value is greater than or equal to.
Value is less than or equal to.
IF a users first name is equal to John then print My name is John!
IF a user's surname is not equal to Smith then print My surname is not Smith!
IF a user's business phone number is NOT blank then print Phone Number: 000-000-000
IF a user's business number is not blank, then print "Call Me at: business number", otherwise if it is blank then print "Call Me at: main number", otherwise if the main number is also blank then print "Call Me at: business mobile", otherwise if the business mobile is also blank then print "Call Us at: company number".
IF a user is a member of firstname.lastname@example.org then print "I'm part of Group.One"
Group Based Signatures
Other than Smart Teams, it's possible to nest statements to generate a different signature based on group memebership.
IF a user is a member of email@example.com then apply the HTML_FOR_SIGNATURE_1, if not but they are a member of firstname.lastname@example.org then apply the HTML_FOR_SIGNATURE_2, and if they are not a member of either group then apply the HTML_IF_NO_GROUP_MEMBERSHIP.
It's recommended to first create each signature you want to generate, then copy/paste the source code of that signature in place of HTML_FOR_SIGNATURE_1, HTML_FOR_SIGNATURE_2 etc within the source code editor. The above code and the HTML for any signature you create should be added using the source code editor and not the WYSWIG editor.
When using #if statements in signatures, sometimes the WYSIWIG editor doesn’t add a line break to the HTML code. This means when there is no value matching the #if statement it leaves a blank line in the generated signature.
To fix this:
Add a line break <br /> in the HTML right before $orgjobtitle:
#if($orgJobTitle != "")</span><span style="font-family: tahoma, arial, helvetica, sans-serif;">$orgJobTitle#end
#if($orgJobTitle != "")</span><span style="font-family: tahoma, arial, helvetica, sans-serif;"><br />$orgJobTitle#end