Does Mechanic support rich email?

Yes, Mechanic's email action supports HTML and CSS in the email body. We process CSS for you, so you're free to use <style> tags without worrying about email client compatibility.

Learn about embedding images in your emails. You can also use email templates for a standard look, shared across tasks.

If you're simply trying to add formatted text and aren't ready to dig into the code yourself, try using a tool like to quickly generate usable HTML.

To illustrate this, here's an example task script:

{% capture email_body %}

<p>Thanks for your interest! <a href="">Would you like to learn more?</a>


<p>&ndash; The team at <a href="https://{{ shop.domain }}/">{{ }}</a></p>


<p style="color: #888">This email brought to you by Mechanic</p>
{% endcapture %}

{% action "email" %}
    "to": "",
    "subject": "This is an HTML message!",
    "body": {{ email_body | json }},
    "reply_to": {{ shop.customer_email | json }},
    "from_display_name": {{ | json }}
{% endaction %}

If you're seeing extra blank lines in your emails that you weren't expecting, check to see if your script is automatically generating linebreaks, like so:

"body": {{ email_body | newline_to_br | json }},

Most predefined tasks in Mechanic's library include this as a feature, converting blank lines to linebreak tags so that you can write emails without having to worry about HTML.

To disable that functionality, just remove the newline_to_br filter, resulting in something like this:

"body": {{ email_body | json }},
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.