<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Email Template URL Calculation]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">My company uses FusionAuth's email templates for many tenants. We would like for each tenant to be able to point to several URLs through the email templates and for a calculation of the URL to be done within the template using Freemarker's replacement variables.</p>
<p dir="auto">For example, a link in the email sent from tenant A should point to domains <a href="http://a.com" rel="nofollow ugc">a.com</a> and <a href="http://b.com" rel="nofollow ugc">b.com</a> and the choice of which to point to should be done dynamically depending on the site which sent the request.</p>
<p dir="auto">Currently, this is made possible on forgot-password email requests through the passing of a state variable which contains the URL (or anything else). Unfortunately, the API does not allow for the passing of this state variable for other email requests, such as verify-email requests, which only allow access to the tenant and user objects.</p>
<p dir="auto">And so, we've had to hard-code the URL into the email templates without a state variable, and tenants can only point to one domain as a result.</p>
<p dir="auto">Is there a way to do this dynamic URL calculation in the email templates for email-verification, etc, which do not have this state variable?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/947/email-template-url-calculation</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 14:58:33 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/947.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Apr 2021 14:35:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Email Template URL Calculation on Sun, 02 May 2021 02:33:40 GMT]]></title><description><![CDATA[<p dir="auto">A couple of options:</p>
<ol>
<li>
<p dir="auto">You could optionally configure a different template for each tenant so you could hard code the correct URL in each template.</p>
</li>
<li>
<p dir="auto">You could also add the correct URL to the <code>tenant.data</code> and then pull it out in the template during render so you could use the same template across tenants.</p>
</li>
<li>
<p dir="auto">If the state parameter is working well for you for other APIs, you could open a feature request in GH to add this to the API in question.</p>
</li>
</ol>
]]></description><link>https://fusionauth.io/community/forum/post/2931</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/2931</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 02 May 2021 02:33:40 GMT</pubDate></item><item><title><![CDATA[Reply to Email Template URL Calculation on Wed, 28 Apr 2021 22:19:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/666">@jim-sadden</a>,</p>
<p dir="auto">After discussing this further, you may have few options (both with considerations and drawbacks) by either using the <code>user</code> object (which is available in some of the templates) and stuffing redirect/URL information in a custom <code>user.data</code> 'holder'.  Another option, if your design allows for it, is to add additional tenants to allow for different forms to be used with different hardcoded URLs.</p>
<p dir="auto">Of course, if this still does not meet your use case requirements feel free to <a href="https://github.com/FusionAuth/fusionauth-issues/issues/new/choose" rel="nofollow ugc">log a feature request</a> for our development team to consider.</p>
<p dir="auto">I hope this helps!</p>
<p dir="auto">Thanks,<br />
Josh</p>
]]></description><link>https://fusionauth.io/community/forum/post/2911</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/2911</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Wed, 28 Apr 2021 22:19:59 GMT</pubDate></item><item><title><![CDATA[Reply to Email Template URL Calculation on Tue, 20 Apr 2021 23:03:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/666">@jim-sadden</a></p>
<p dir="auto">In thinking about this, this almost sounds like a feature/extension.  I will run this by my colleagues to see if they have any thoughts on it or a workaround/different approach!</p>
<p dir="auto">Thanks,<br />
Josh</p>
]]></description><link>https://fusionauth.io/community/forum/post/2858</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/2858</guid><dc:creator><![CDATA[joshua]]></dc:creator><pubDate>Tue, 20 Apr 2021 23:03:16 GMT</pubDate></item></channel></rss>