From d179ba123fd57ef746ce3d621685d0b1acd66d4c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 24 Jul 2019 22:38:49 +0300 Subject: [PATCH] imap: if unspecified, type is text/html --- imap/message.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/imap/message.go b/imap/message.go index c0d4428..95ebbc8 100644 --- a/imap/message.go +++ b/imap/message.go @@ -132,7 +132,11 @@ func (mbox *mailbox) fetchBodyStructure(msg *protonmail.Message, extended bool) } } - inlineType, inlineSubType := splitMIMEType(msg.MIMEType) + inlineType := "text" + inlineSubType := "html" + if msg.MIMEType != "" { + inlineType, inlineSubType = splitMIMEType(msg.MIMEType) + } parts := []*imap.BodyStructure{ &imap.BodyStructure{ MIMEType: inlineType,