Forward incoming email to another address, with Mechanic.

Mechanic is a development and ecommerce automation platform for Shopify. :)

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.)

Runs Occurs when your Mechanic account receives an email. Configuration includes email recipient.

15-day free trial – unlimited tasks

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.)

Developer details

Mechanic is designed to benefit everybody: merchants, customers, developers, agencies, Shopifolks, everybody.

That’s why we make it easy to configure automation without code, why we make it easy to tweak the underlying code once tasks are installed, and why we publish it all here for everyone to learn from.

(By the way, have you seen our documentation? Have you joined the Slack community?)

Open source
View on GitHub to contribute to this task
Subscriptions
mechanic/emails/received
Tasks use subscriptions to sign up for specific kinds of events. Learn more
Options
email recipient (email, required)
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 %}
Task code is written in Mechanic Liquid, an extension of open-source Liquid enhanced for automation. Learn more