<html>
<head>
    <meta http-equiv="Content-Type" content="text/html">
    {% if message.subject %}
        <title>{{ message.subject }}</title>
    {% endif %}

    <style type="text/css">
        #container {
            margin: 10px auto;
        }

        #message_headers {
            background: #fff;
            font-size: 12px;
            font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
            border-bottom: 1px solid #dedede;
            overflow: auto;
        }

        .message_container {
            margin: 5px auto;

            min-width: 400px;
        }

        .row {
            display: block;
            overflow: auto;
        }

        .col-left, .col-right {
            float: left;
            min-height: 1px;
            overflow: auto;
        }

        .col-left {
            width: 100px;
            text-align: right;
        }

        .col-right {
            min-width: 200px;
            padding-left: 10px;
        }

        pre#message_body {
            padding: 4px;
            white-space: pre-wrap;
            border: 1px solid #eee;
            background-color: #fcfcfc;
        }
    </style>
</head>
<body>
<div id="container">
    <div id="message_headers">
        <div class="message_container">
            <div class="row">
                <div class="col-left">From:</div>
                <div class="col-right">{{ message.from_email }}</div>
            </div>
            <div class="row">
                <div class="col-left">Subject:</div>
                <div class="col-right"><b>{{ message.subject }}</b></div>
            </div>
            <div class="row">
                <div class="col-left">Date:</div>
                <div class="col-right">Sep 2, 2014 10:35:58 PM WIB</div>
            </div>
            <div class="row">
                <div class="col-left">To:</div>
                <div class="col-right">{{ message.to }}</div>
            </div>
            {% if message.attachments %}
                <div class="row">
                    <div class="col-left">Attachment:</div>
                    <div class="col-right">
                        <ul>
                            {% for attachment in message.attachments %}
                                <li>{{ attachment }}</li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>
            {% endif %}
        </div>
    </div>

    {{ body|safe }}

</div>
</body>
</html>
