[evolution/gnome-41] mail-importer: Ensure Message-ID header on imported message



commit 9090b9839e2c207aa1e709b838e6a2a76ea5ddff
Author: Milan Crha <mcrha redhat com>
Date:   Tue Oct 12 15:08:11 2021 +0200

    mail-importer: Ensure Message-ID header on imported message
    
    The Message-ID header is required when rendering the message preview,
    thus, in case it's not available in the message, add it.

 src/modules/mail/e-mail-shell-backend.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/modules/mail/e-mail-shell-backend.c b/src/modules/mail/e-mail-shell-backend.c
index bcff4d04d6..62a0d6e2b1 100644
--- a/src/modules/mail/e-mail-shell-backend.c
+++ b/src/modules/mail/e-mail-shell-backend.c
@@ -187,6 +187,9 @@ mbox_fill_preview_cb (GObject *preview,
                mail_session = e_mail_session_new (registry);
        }
 
+       if (!camel_mime_message_get_message_id (msg))
+               camel_mime_message_set_message_id (msg, NULL);
+
        parser = e_mail_parser_new (CAMEL_SESSION (mail_session));
        e_mail_parser_parse (
                parser, NULL, camel_mime_message_get_message_id (msg), msg,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]