<div style="width: 570px; border: 1px solid #e1e1e1; margin-left: auto; margin-right: auto; border-radius: 4px; padding-top: 5px; padding-bottom: 15px; padding-left: 25px; padding-right: 25px;">
  <table style="width: 100%; font-size: 16px; border: 0;">
    <thead>
      <tr>
        <th style="text-align: center; border-bottom: 1px solid #ddd; padding-top: 15px; padding-bottom: 15px;">
          {% if logo %}
            <a href="{{ store_url }}"><img src="{{ logo }}" alt="{{ store_name }}" title="{{ store_name }}" style="margin-left: auto; margin-right: auto;"/></a>
          {% else %}
            <a href="{{ store_url }}">{{ store_name }}</a>
          {% endif %}</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td style="text-align: center; border-bottom: 1px solid #ddd;"><h1>{{ text_request }}</h1></td>
      </tr>
      <tr>
        <td style="border-bottom: 1px solid #ddd;">
          <p>{{ text_hello }}</p>
          <p>{{ text_gdpr }}</p></td>
      </tr>
      {% if customer_id %}
        <tr>
          <td style="text-align: center; border-bottom: 1px solid #ddd;"><h2>{{ text_customer }}</h2></td>
        </tr>
        <tr>
          <td style="border-bottom: 1px solid #ddd;">
            <table style="width: 100%;">
              <tbody>
                <tr>
                  <td style="width: 30%;">{{ text_name }}</td>
                  <td>{{ firstname }} {{ lastname }}</td>
                </tr>
                <tr>
                  <td>{{ text_email }}</td>
                  <td>{{ email }}</td>
                </tr>
                <tr>
                  <td>{{ text_telephone }}</td>
                  <td>{{ telephone }}</td>
                </tr>
              </tbody>
            </table></td>
        </tr>
      {% endif %}
      {% if addresses %}
        <tr>
          <td style="text-align: center; border-bottom: 1px solid #ddd;"><h2>{{ text_addresses }}</h2></td>
        </tr>
        {% set address_row = 1 %}
        {% for address in addresses %}
          <tr>
            <td style="text-align: center; border-bottom: 1px solid #ddd;"><h3>{{ text_address }} {{ address_row }}</h3></td>
          </tr>
          <tr>
            <td style="border-bottom: 1px solid #ddd;">
              <table style="width: 100%;">
                <tbody>
                  <tr>
                    <td style="width: 30%;">{{ text_recipient }}</td>
                    <td>{{ address.firstname }} {{ address.lastname }}</td>
                  </tr>
                  {% if address.company %}
                    <tr>
                      <td>{{ text_company }}</td>
                      <td>{{ address.company }}</td>
                    </tr>
                  {% endif %}
                  <tr>
                    <td>{{ text_address_1 }}</td>
                    <td>{{ address.address_1 }}</td>
                  </tr>
                  {% if address.address_2 %}
                    <tr>
                      <td>{{ text_address_2 }}</td>
                      <td>{{ address.address_2 }}</td>
                    </tr>
                  {% endif %}
                  <tr>
                    <td>{{ text_city }}</td>
                    <td>{{ address.city }}</td>
                  </tr>
                  {% if address.postcode %}
                    <tr>
                      <td>{{ text_postcode }}</td>
                      <td>{{ address.postcode }}</td>
                    </tr>
                  {% endif %}
                  {% if address.zone %}
                    <tr>
                      <td>{{ text_zone }}</td>
                      <td>{{ address.zone }}</td>
                    </tr>
                  {% endif %}
                  <tr>
                    <td>{{ text_country }}</td>
                    <td>{{ address.country }}</td>
                  </tr>
                </tbody>
              </table></td>
          </tr>
          {% set address_row = address_row + 1 %}
        {% endfor %}
      {% endif %}
      {% if ips %}
        <tr>
          <td style="text-align: center; border-bottom: 1px solid #ddd;"><h2>{{ text_history }}</h2></td>
        </tr>
        <tr>
          <td style="border-bottom: 1px solid #ddd;">
            <table style="width: 100%;">
              <thead>
                <tr>
                  <th style="width: 50%; text-align: left;">{{ text_ip }}</th>
                  <th style="text-align: left;">{{ text_date_added }}</th>
                </tr>
              </thead>
              <tbody>
                {% for ip in ips %}
                  <tr>
                    <td>{{ ip.ip }}</td>
                    <td>{{ ip.date_added }}</td>
                  </tr>
                {% endfor %}
              </tbody>
            </table></td>
        </tr>
      {% endif %}
    </tbody>
  </table>
  <p>{{ text_contact }}</p>
  <p>
    <br/>
  </p>
  <p style="text-align: center;"><a href="{{ store_url }}" style="border-radius: 4px; color: #fff; text-decoration: none; background-color: #01b3e8; padding-left: 18px; padding-right: 18px; padding-top: 10px; padding-bottom: 10px; font-size: 18px; font-weight: bold;">{{ store_name }}</a></p>
  <p>
    {{ text_thanks }}
    <br/>
    <strong>{{ store_name }}</strong>
  </p>
</div>
