From 620e316fb463b4525cb8b01d78e2528a22636f19 Mon Sep 17 00:00:00 2001 From: Robert Virkus Date: Wed, 15 Apr 2020 14:54:44 +0200 Subject: [PATCH] Always set the MIME-Version header --- lib/mail_conventions.dart | 1 + lib/message_builder.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/mail_conventions.dart b/lib/mail_conventions.dart index 04541c09..db18afe6 100644 --- a/lib/mail_conventions.dart +++ b/lib/mail_conventions.dart @@ -71,6 +71,7 @@ class MailConventions { 'Content-Transfer-Encoding'; static const String headerContentDisposition = 'Content-Disposition'; static const String headerContentDescription = 'Content-Description'; + static const String headerMimeVersion = 'MIME-Version'; //static const String header = ''; } diff --git a/lib/message_builder.dart b/lib/message_builder.dart index 7694e63f..52f148b6 100644 --- a/lib/message_builder.dart +++ b/lib/message_builder.dart @@ -329,6 +329,7 @@ class MessageBuilder extends PartBuilder { if (subject != null) { addHeader('Subject', subject, encode: true); } + addHeader(MailConventions.headerMimeVersion, '1.0'); if (replyToMessage != null) { var originalMessageId = replyToMessage.getHeaderValue('message-id'); addHeader(MailConventions.headerInReplyTo, originalMessageId);