Auth0 Home Blog Docs

Is it possible to change From field dynamically in Email Templates(Change Password)?

I’m trying to change From field according as some conditions(like user.app_metadata.is_foo) with Liquid.

The type of is_foo is boolean

But I’ve got the following error message when clicking Try button. It looks like the Liquid syntax is not supported in From field.

The value {% if user.app_metadata.is_foo %} FOO <noreply@foo.com> {% else %} BAZ <noreply@baz.com> {% endif %}
is not valid for the From field.
Possible values: an email address ('support@yourapp.com') or a prefix and an email address between <> ('Your App <support@yourapp.com>')

Is it possible to change From field dynamically in Email Templates(Change Password)?

Hey there @emag!

Not sure if it can be changed dynamically but let me research it and get back to you with an answer!

1 Like

Hey again!

After some internal discussions and visiting this doc:

liquid syntax is is available in from field. The From Address field supports all the common variables for templates.

Hi, Konrad!

Thank you for your investigation.

Unfortunately, it looks like the situation hasn’t changed.

Steps to reproduce:

  1. Input the string including Liquid tag in From field on Change Password Email Template
{% if user.app_metadata.is_foo %} FOO <noreply@foo.com> {% else %} BAZ <noreply@baz.com> {% endif %}

noreply@foo.com and noreply@baz.com are just examples. I replace them with valid addresses.

  1. Click SAVE
  2. Click TRY and show the error message

  1. Click TRY in the dialogue but I never receive the mail

Thank you a lot for providing all that information. Let me dive into it once again and get back to you once I have news to share!

1 Like

I was able to get the same results. It seems that either there is something wrong with our stack or the doc itself. I’ll make sure to report it internally!

1 Like

Hi, @konrad.sopala ! Any update on this? Thanks!

Hey there!

Let me circle back with the team to see where it went in the meantime!