diff options
Diffstat (limited to 'libemail-engine')
-rw-r--r-- | libemail-engine/e-mail-session-utils.c | 11 | ||||
-rw-r--r-- | libemail-engine/mail-ops.c | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c index 33e7effa47..7ec3ca3a70 100644 --- a/libemail-engine/e-mail-session-utils.c +++ b/libemail-engine/e-mail-session-utils.c @@ -863,10 +863,13 @@ e_mail_session_send_to (EMailSession *session, transport_uid = g_strstrip (g_strdup (string)); if (replies_to_origin_folder) { - string = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL); - if (string != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) { - g_free (sent_folder_uri); - sent_folder_uri = g_strstrip (g_strdup (string)); + string = camel_header_raw_find (&xev, "X-Evolution-Source-Flags", NULL); + if (string != NULL && strstr (string, "FORWARDED") == NULL) { + string = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL); + if (string != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) { + g_free (sent_folder_uri); + sent_folder_uri = g_strstrip (g_strdup (string)); + } } } diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c index e24e8c9752..748152602c 100644 --- a/libemail-engine/mail-ops.c +++ b/libemail-engine/mail-ops.c @@ -623,10 +623,13 @@ mail_send_message (struct _send_queue_msg *m, sent_folder_uri = g_strstrip (g_strdup (tmp)); if (replies_to_origin_folder) { - tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL); - if (tmp != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) { - g_free (sent_folder_uri); - sent_folder_uri = g_strstrip (g_strdup (tmp)); + tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Flags", NULL); + if (tmp != NULL && strstr (tmp, "FORWARDED") == NULL) { + tmp = camel_header_raw_find (&xev, "X-Evolution-Source-Folder", NULL); + if (tmp != NULL && camel_header_raw_find (&xev, "X-Evolution-Source-Message", NULL) != NULL) { + g_free (sent_folder_uri); + sent_folder_uri = g_strstrip (g_strdup (tmp)); + } } } |