aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-06-09 04:26:13 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-06-09 04:26:13 +0800
commitda6c1c4d2ef41c60130e4de31160ee8107227588 (patch)
treee85c0f11b9b5029281a341a1bdbf21d3593d271c /mail/mail-ops.c
parent1cb2bd29bec3bfb81e06c0f9fc11e4ae3020757a (diff)
downloadgsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.gz
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.zst
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.zip
Reattach X-Evolution-Account information to the message after sending it.
2001-06-08 Jon Trowbridge <trow@ximian.com> * mail-ops.c (mail_send_message): Reattach X-Evolution-Account information to the message after sending it. This way it can be used to set the identity properly if we later Resend the message. svn path=/trunk/; revision=10162
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 4812f8c110..de2a933249 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -485,6 +485,7 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte
CamelTransport *xport = NULL;
CamelFolder *folder;
const char *version, *header;
+ gchar *acct_header;
char *transport_url = NULL, *sent_folder_uri = NULL;
if (SUB_VERSION[0] == '\0')
@@ -499,11 +500,11 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte
camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Source");
/* Get information about the account this was composed by. */
- header = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account");
+ acct_header = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"));
if (header) {
const MailConfigAccount *account;
- account = mail_config_get_account_by_name (header);
+ account = mail_config_get_account_by_name (acct_header);
camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Account");
if (account) {
transport_url = g_strdup (account->transport->url);
@@ -546,6 +547,12 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte
/* post-process */
info = camel_message_info_new ();
info->flags = CAMEL_MESSAGE_SEEN;
+
+ /* Re-attach account header */
+ if (acct_header) {
+ camel_medium_add_header (CAMEL_MEDIUM (message), "X-Evolution-Account", acct_header);
+ g_free (acct_header);
+ }
if (driver)
camel_filter_driver_filter_message (driver, message, info,