From 3db443c1df77804270f86e9e2afe92da52314685 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 23 Oct 2020 15:32:59 -0400 Subject: message.html: add tab to view raw email --- plugins/base/routes.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/base/routes.go b/plugins/base/routes.go index 7ba6253..0277174 100644 --- a/plugins/base/routes.go +++ b/plugins/base/routes.go @@ -334,7 +334,11 @@ func handleGetPart(ctx *alps.Context, raw bool) error { return fmt.Errorf("failed to parse part Content-Type: %v", err) } if len(partPath) == 0 { - mimeType = "message/rfc822" + if ctx.QueryParam("plain") == "1" { + mimeType = "text/plain" + } else { + mimeType = "message/rfc822" + } } if raw { -- cgit v1.2.3