Problem/Motivation

HTML tags such as <p>, <div>, <sup> are not saved for the email bodies.

Steps to reproduce

Enter in HTML such as:

<p>Hi [user:field_first_name],</p>
<p>A request to reset the password for your account has been made at [site:name].</p>
<p>You may now log in by clicking this link:</p>
<div class="wrapper" style="margin: 15px 0">
	<div class="button" style="">[rest_password_reset:login_link]</div>
</div>
<p>This link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.</p>
<p>Please email <a href="mailto:help@help.com">help@help.com</a> if you have any questions.
<p>Regards,</p>
<p><strong>Help<sup>SUP.</sup></strong></p>

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 reset_email.jpg94.7 KBajlow

Comments

ajlow created an issue. See original summary.

jb044’s picture

A proper HTML mail should have a plain text fallback. HTML mail was not intended in this module, in my experience a good html mail can be a lot of trouble so I simply never implemented it. But I can see it could have it's uses, however simply including some html tags is not a proper HTML mail, a good implementation of this involves a bit more than that.

Marking this as a feature request.

jb044’s picture

Assigned: Unassigned » jb044
Category: Bug report » Feature request
ajlow’s picture

StatusFileSize
new94.7 KB

Thank you for the reply.

In terms of the email format and styling, it seems to pick up the email twig setup for the site? For instance, the reset email picks up my Mimemail twig (see attached).

One idea is to allow for text formats? Or perhaps use Xss::filterAdmin() for only admins?