<script setup>
import { model } from "#imports";
const columns = model("MailLog").columns({
  maillog_id: true,
  from: true,
  to: true,
  subject: true,
  created_time: true,
  body: true
});
function requestMailLog(event) {
  event.loadObjects("MailLog", {}, ["body"]);
}
</script>

<template>
    <l-page>
        <l-table
            row-key="maillog_id"
            @request-data="requestMailLog"
            :columns="columns"
            sort-by="maillog_id:desc"
        >
            <template #row-expand="props">
                <iframe
                    width="100%"
                    height="300px"
                    :srcdoc="props.row.body"
                    frameborder="0"
                    sandbox
                ></iframe>
            </template>
        </l-table>
    </l-page>
</template>
