diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 01:35:34 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 01:35:34 +0800 |
commit | 8d7534b4a0cd8331ee52b235ae4a670e1e5b10b9 (patch) | |
tree | 27f312454c27a90160875393f646cc35d436e501 /composer | |
parent | ae834b3a2ff4101b657a2dccae0d6c20a35eac28 (diff) | |
download | gsoc2013-evolution-8d7534b4a0cd8331ee52b235ae4a670e1e5b10b9.tar.gz gsoc2013-evolution-8d7534b4a0cd8331ee52b235ae4a670e1e5b10b9.tar.zst gsoc2013-evolution-8d7534b4a0cd8331ee52b235ae4a670e1e5b10b9.zip |
Bug 653568 - Forward as Redirect doesn't work
X-Evolution-Account and X-Evolution-Transport headers were not getting
set in redirected messages.
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-msg-composer.c | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 27f454c08f..6ba256d143 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -520,6 +520,7 @@ build_message_headers (EMsgComposer *composer, CamelInternetAddress *addr; const gchar *name = account->id->name; const gchar *address = account->id->address; + gchar *transport_uid; medium = CAMEL_MEDIUM (message); @@ -535,6 +536,21 @@ build_message_headers (EMsgComposer *composer, } else camel_mime_message_set_from (message, addr); g_object_unref (addr); + + /* X-Evolution-Account */ + camel_medium_set_header ( + medium, "X-Evolution-Account", account->uid); + + /* X-Evolution-Fcc */ + camel_medium_set_header ( + medium, "X-Evolution-Fcc", account->sent_folder_uri); + + /* X-Evolution-Transport */ + transport_uid = g_strconcat ( + account->uid, "-transport", NULL); + camel_medium_set_header ( + medium, "X-Evolution-Transport", transport_uid); + g_free (transport_uid); } /* Reply-To: */ @@ -1057,6 +1073,7 @@ composer_build_message (EMsgComposer *composer, /* If this is a redirected message, just tweak the headers. */ if (priv->redirect) { + context->skip_content = TRUE; context->message = g_object_ref (priv->redirect); build_message_headers (composer, context->message, TRUE); g_simple_async_result_complete (simple); @@ -1091,38 +1108,16 @@ composer_build_message (EMsgComposer *composer, CAMEL_MEDIUM (context->message), "X-Priority", "1"); - if (account != NULL) { - gchar *transport_uid; - - /* X-Evolution-Account */ - camel_medium_set_header ( - CAMEL_MEDIUM (context->message), - "X-Evolution-Account", account->uid); - - /* X-Evolution-Fcc */ - camel_medium_set_header ( - CAMEL_MEDIUM (context->message), - "X-Evolution-Fcc", account->sent_folder_uri); + /* Organization */ + if (account != NULL && account->id->organization != NULL) { + gchar *organization; - /* X-Evolution-Transport */ - transport_uid = g_strconcat ( - account->uid, "-transport", NULL); + organization = camel_header_encode_string ( + (const guchar *) account->id->organization); camel_medium_set_header ( CAMEL_MEDIUM (context->message), - "X-Evolution-Transport", transport_uid); - g_free (transport_uid); - - /* Organization */ - if (account->id->organization != NULL) { - gchar *organization; - - organization = camel_header_encode_string ( - (const guchar *) account->id->organization); - camel_medium_set_header ( - CAMEL_MEDIUM (context->message), - "Organization", organization); - g_free (organization); - } + "Organization", organization); + g_free (organization); } /* X-Evolution-Format */ |