Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ConradIrwin/b7f4d9aebab1b5f16c04 to your computer and use it in GitHub Desktop.
Save ConradIrwin/b7f4d9aebab1b5f16c04 to your computer and use it in GitHub Desktop.
You can copy and paste the following code into the Email Reply Theme to make your emails look like they are sent from gmail.
{% assign emails = case.emails %}
{% assign threadlength = emails.size|minus:1 %}
{% for email in emails reversed %}
{% if forloop.first %}
{{email.new_html}}
{% if email.agent %}
{% if email.agent.signature %}
<div style="margin-top:10px;"> {{email.agent.signature | newline_to_br}}</div>
{% else %}
<p>
--<br />
{{email.agent.name_public}}<br />
</p>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% assign emails = case.emails %}{% for email in emails reversed %}{{email.new_text}}
{% if email.agent %}
--
{% if email.agent %}{% if email.agent.signature %}{{email.agent.signature | strip_html }}{%else%}{{email.agent.name_public}}{% endif %}
{% endif %}
{% if forloop.rindex0 != 0 %}
On {{email.send_at | date: "%b %d, %Y"}} at {{email.send_at | in_time_zone: site.timezone | date: "%I:%M%p %Z"}}, {% if email.agent %}{{email.agent.name_public}} {% else %}{% if customer.id == email.from_customer.id %}{{customer.first_name}} <{{ customer.email }}>{% else %}{{email.from_customer.first_name}} <{{ email.from_customer.email }}>{% endif %}{% endif %} wrote:
{% endif %}{% endif %}{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment