diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-11 01:35:34 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:35 +0800 |
commit | 6888df9c52976f8c51a02f1eca103b934e6eb619 (patch) | |
tree | 5d7d214c6b4d88631e9fd68665fc5c78612966d6 /composer | |
parent | 5b304491bef52d115ed15522dca695b9d449d8a6 (diff) | |
download | gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar.gz gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar.bz2 gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar.lz gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar.xz gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.tar.zst gsoc2013-evolution-6888df9c52976f8c51a02f1eca103b934e6eb619.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 */ |