[Done] Add links as href in Users Service Email Configuration

I want to change the appearance of Emails that are sent by the User Service (Like reset password, confirm email etc.)

For example here, let’s just take this template I found on Pinterest.

The first challenge I faced was that the only thing offered to me for making changes was a Quill Editor (Which can’t really give me the look I am talking about). Luckily, the Classic Anvil Editor still allowed making changes to the HTML directly so I was able to achieve the look I want.

Now the Problem

In the example image, there is a “Reset Your Password” button which upon clicking redirects you to the reset link. But Anvil automatically adds <a> tag wherever I add {{reset_link}}. And I cannot make any changes to it,

For example, if I go for

<a href="{{reset_link}}"> Reset Password </a>

The href property will now become

<a href="<a href=(Actual Reset Link)></a>"> Reset Password </a>

Is there any way to get around this?

2 Likes

Moved to feature requests

  1. be able to write raw html in the user email configurations in the new ide (rather than the quill editor)
  2. be able to use hrefs in the template like: {{reset_href}}, rather than the {{reset_link}} currently provided.
3 Likes

Hi @stucork

Maybe consider this too?!

It would be really helpful to have the ability to access values from the users table directly within email configurations. If we could expose the user_row data in a similar way to {{reset_link}}, as {{user}}, it would allow for more personalized emails. For example, we could use something like {{user['name']}} to include the user’s name in the email content. To take it one step further, it would be great to have the capability to use conditionals within the email template, like:

{{'New User' if user['name'] is None else user['name']}}

This would greatly enhance the customization and personalization options.

1 Like

That’s now done

you should be able to edit the source as html with the handy toggle in the users service email configuration
(no need to switch to the classic editor)

for every {{confirm_link}} template, there’s also a {{confirm_url}}
that way you can customise the look of the links as you wish

Note: We haven’t yet documented these extra templates.

2 Likes

Great! Just what I needed!

Thanks for implementing these features.

1 Like