emiel
September 29, 2022, 7:55am
1
Hi there,
Is it possible to be able to differentiate between e-mail addresses that are specified in the From field?
Currently it’s configured like this:
But we would like to be able to use something like one e-mail address for a certain application and a ‘generic’ one as the fallback.
Just like we did with Subject I’m thinking of something like:
{{ application.name }} {% if application.client_metadata.is_portal == 'true' %}<application-one-support@mydomain.com>{% else %}<support@mydomain.com>{% endif %}
It seems it’s not working, but perhaps the syntax needs to be a bit different because of the <
and >
?
Thanks!
Hi @emiel
Thanks for getting in touch with Auth0 Community.
You can try this technique:
{{ application.name }} {% if user.app_metadata.is_portal == 'true' %} <support@example1.com> {% else %} support@example2.com {% endif %}
I gave this a quick test and seems to work as expected.
Warm regards
emiel
September 30, 2022, 12:55pm
3
Hello @SaqibHussain
Thanks for this. It works indeed.
Just a small comment on your code snippet, the second address does not include the angle brackets which I believe is necessary for the e-mail client to recognize it as the sender’s address.
In any case. It does work. Thanks!
system
Closed
October 14, 2022, 12:55pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.