diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-26 18:23:11 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-09-26 18:23:11 +0800 |
commit | 8db7139c1915737d987c1613a3211e881a1dd07f (patch) | |
tree | 449d4f091eb0be38e820653bb8616eadad677efd | |
parent | f579563b058cfc099ebf858b2ef096d5e61bda92 (diff) | |
download | gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar.gz gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar.bz2 gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar.lz gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar.xz gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.tar.zst gsoc2013-evolution-8db7139c1915737d987c1613a3211e881a1dd07f.zip |
Bug #659440 - Doesn't mark messages as replied when sending offline
-rw-r--r-- | mail/mail-ops.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index bf57a97ca7..2c4b3067df 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -45,6 +45,7 @@ #include "e-mail-local.h" #include "e-mail-session.h" +#include "e-mail-session-utils.h" #define w(x) #define d(x) @@ -711,6 +712,26 @@ mail_send_message (struct _send_queue_msg *m, } if (local_error == NULL) { + /* Mark the draft message for deletion, if present. */ + e_mail_session_handle_draft_headers_sync ( + m->session, message, cancellable, &local_error); + if (local_error != NULL) { + g_warning ("%s: Failed to handle draft headers: %s", G_STRFUNC, local_error->message); + g_clear_error (&local_error); + } + + /* Set flags on the original source message, if present. + * Source message refers to the message being forwarded + * or replied to. */ + e_mail_session_handle_source_headers_sync ( + m->session, message, cancellable, &local_error); + if (local_error != NULL) { + g_warning ("%s: Failed to handle source headers: %s", G_STRFUNC, local_error->message); + g_clear_error (&local_error); + } + } + + if (local_error == NULL) { camel_folder_set_message_flags ( queue, uid, CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN, ~0); |