aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-26 18:23:11 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-26 18:56:08 +0800
commitb24376fea6f8a1e3cb8d27680262ac5d1543e809 (patch)
tree6abc1113bfd723fc1b496d8b426f952dde0fae11
parent34f19df86518cd0d8f6bb5437ba989997564f20d (diff)
downloadgsoc2013-evolution-b24376fea6f8a1e3cb8d27680262ac5d1543e809.tar.gz
gsoc2013-evolution-b24376fea6f8a1e3cb8d27680262ac5d1543e809.tar.zst
gsoc2013-evolution-b24376fea6f8a1e3cb8d27680262ac5d1543e809.zip
Bug #659440 - Doesn't mark messages as replied when sending offline
-rw-r--r--mail/mail-ops.c21
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);