How to Create a Dynamic Email Signature?

Philippe Lehoux
by Philippe Lehoux

Most people use a simple and static email signature telling basic information about themself and their company (job title, phone numbers, address, etc.).

Basic email signature

Others have more complex usage; for instance, they will gather feedback on how well they answered their customer questions.

What if you could be more creative? For instance, what if you could change your signature copy based on the day of the week? Like adding the sentence "Have a great weekend!" in emails sent on Friday!

Let me show you how, with Missive, the best business email client.

Copy-paste the following code snippet in the signature editor where you want the sentence to appear:

  {% assign today = "now" | date: "%A" %}
  {% if today == "Friday" %}Have a great weekend!{% endif %}

The first line parses the current date and assigns the day value to the today variable. The second line checks if the today variable is equal to Friday and, if so, outputs the Have a great weekend sentence.

By adding an else statement, you could display an alternative sentence. The below code will display Have a great weekend! on Fridays and Cheers, every other day.

  {% assign today = "now" | date: "%A" %}
  {% if today == "Friday" %}Have a great weekend!{% else %}Cheers,{% endif %}
  Philippe Lehoux
Email signature editor with dynaimic code

How is this possible? Missive takes advantage of the powerful templating engine liquid.js that allows you to do crazy stuff! Learn more.

p.s. Thanks to Laura Soar, one of our customers, who suggested this cool idea.

Philippe Lehoux

CEO at Missive
Follow me on Twitter