I am adding a logo to the email message When someone creates an account:
via Settings > Email > Messages
, the image displays/renders correctly when viewed as "HTML / Rich Text" within mail clients, however; when the email is viewed as plain text, the html for the image is still output (as plain text) rather than being omitted.
Is it possible to conditionally render output from within the message depending on if the type of email content currently being parsed by Craft is for text/html
or text/plain
?
Desired usage:
{% if html %}
This is the text/html part of the email message.
{% elseif plain %}
This is the text/plain part of the email message.
{% endif %}
For reference the message content is currently:
<img src="http://www.example.org/admin/resources/rebrand/logo/logo.svg" width="200">
Dear X,
As a registered user...
Aside: This assumes that Craft processes the email message twice within the same process, once as plain and again as html. If this is not the case then this would likely be unachievable. I do not have an HTML Email Template
set within Settings > Email
.