<h1>Mail</h1>

<button data-ng-click="start()" class="btn btn-default" data-ng-show="!status.started">Start</button>
<button data-ng-click="stop()" class="btn btn-default" data-ng-show="status.started">Stop</button>
<button data-ng-click="loadMessages()" class="btn btn-default" data-ng-show="status.started">Refresh</button>

<table class="table table-striped table-bordered">
    <thead>
    <tr>
        <th>Date</th>
        <th>To</th>
        <th>From</th>
        <th>Subject</th>
        <th>Body</th>
    </tr>
    </thead>
    <tr data-ng-repeat="m in messages|reverse">
        <td>{{m.date|date:'medium'}}</td>
        <td>{{m.to}}</td>
        <td>{{m.from}}</td>
        <td>{{m.subject}}</td>
        <td><pre>{{m.body}}</pre></td>
    </tr>
</table>