This commit is contained in:
2026-06-01 20:43:01 +08:00
parent 0e9b62f5cf
commit 3dcc3f9a35
7 changed files with 137 additions and 15 deletions
+10 -1
View File
@@ -6,6 +6,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>查看邮件 - MailGo 管理后台</title>
{{template "styles" .}}
<style>
.mail-body-iframe {
width: 100%;
min-height: 300px;
border: 1px solid #e0e0e0;
border-radius: 4px;
background: #fff;
}
</style>
</head>
<body>
{{template "navbar" .}}
@@ -35,7 +44,7 @@
</div>
<div class="mail-body">
{{if .message.HtmlBody}}
{{.message.HtmlBody | safeHTML}}
<iframe class="mail-body-iframe" srcdoc="{{.message.HtmlBody | safeJS}}" sandbox="allow-same-origin" onload="this.style.height=this.contentDocument.body.scrollHeight+20+'px'"></iframe>
{{else}}
<pre style="white-space:pre-wrap;font-family:inherit;">{{.message.TextBody}}</pre>
{{end}}
+10 -1
View File
@@ -6,6 +6,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>查看邮件 - MailGo</title>
{{template "styles" .}}
<style>
.mail-body-iframe {
width: 100%;
min-height: 300px;
border: 1px solid #e0e0e0;
border-radius: 4px;
background: #fff;
}
</style>
</head>
<body>
{{template "navbar" .}}
@@ -32,7 +41,7 @@
</div>
<div class="mail-body">
{{if .message.HtmlBody}}
{{.message.HtmlBody | safeHTML}}
<iframe class="mail-body-iframe" srcdoc="{{.message.HtmlBody | safeJS}}" sandbox="allow-same-origin" onload="this.style.height=this.contentDocument.body.scrollHeight+20+'px'"></iframe>
{{else}}
<pre style="white-space:pre-wrap;font-family:inherit;">{{.message.TextBody}}</pre>
{{end}}