Mechanic Get Mechanic
Task library

Forward incoming email to another address

This task monitors for incoming mail, sent directly to your Mechanic account, and forwards all of it (including attachments) to the address of your choice. (Note that only emails less than 10MB in total size will be sent.)

Try this task

When it runs

Occurs when your Mechanic account receives an email

What you choose

Email recipient

Documentation

This task monitors for incoming mail, sent directly to your Mechanic account, and forwards all of it (including attachments) to the address of your choice. (Note that only emails less than 10MB in total size will be sent.)

Task code and subscriptions

You can edit the Liquid code after installing this task. View on GitHub or ask a question in the Mechanic Slack community.

Subscriptions

mechanic/emails/received
How task subscriptions work

Option types and flags

Task code

{% assign attachments = hash %}
{% for attachment in email.attachments %}
  {% assign attachments[attachment.name] = hash %}
  {% assign attachments[attachment.name]["base64"] = attachment.content %}
{% endfor %}

{% action "email" %}
  {
    "to": {{ options.email_recipient__email_required | json }},
    "subject": {{ email.subject | json }},
    "body": {{ email.html_body | json }},
    "reply_to": {{ email.from | json }},
    "from_display_name": {{ email.from_name | append: " (via Mechanic)" | json }},
    "attachments": {{ attachments | json }}
  }
{% endaction %}
Mechanic Liquid reference