Hello, I wish to send a different email template depending on the domain of the application. The email templates are the welcome email, or verification email etc. Apparently an old post suggested to use liquid syntax (conditions) for that: Custom Email template for differant applications - #3 by konrad.sopala . The post is from 2019 is still this relevant and the recommended solution doing so? Are there other solutions? Thank you.
Hi @axel-insightsphere and thank you for your question!
Yes, absolutely, customizing the email template is still done using the Liquid syntax. In the template, you will have access to the domain, which you can use to build the logic you need, similar to this:
{% if custom_domain.domain == "app1.yourcompany.com" %}
<h1>Welcome to App One!</h1>
<p>Your journey with App One starts now...</p>
{% elsif custom_domain.domain == "app2.yourcompany.net" %}
<h1>Greetings from App Two.</h1>
<p>We're excited to have you join App Two.</p>
{% else %}
<h1>Welcome to our service.</h1>
<p>Thank you for signing up!</p>
{% endif %}
Here is a link to our docs for Customizing Email Templates, and here is a link to the Liquid Syntax docs.
Please let me know if you need more help, and I’ll make sure to find some more information for you.
Kind regards,
Teodor.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.