aboutsummaryrefslogtreecommitdiffstats
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
parent1cb2bd29bec3bfb81e06c0f9fc11e4ae3020757a (diff)
downloadgsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.gz
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.bz2
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.lz
gsoc2013-evolution-da6c1c4d2ef41c60130e4de31160ee8107227588.tar.xz
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
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-callbacks.c3
-rw-r--r--mail/mail-ops.c11
3 files changed, 16 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1cbeefbd50..0bee194cc6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
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.
+
* mail-tools.c (mail_tool_get_local_movemail_path): If you had
multiple accounts that used mboxes, and if you received mail in N
of those accounts, you would get N copies of each of your e-mail
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index e998d5e428..448706bf41 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -984,8 +984,9 @@ do_edit_messages(CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, void
for (i = 0; i < messages->len; i++) {
EMsgComposer *composer;
-
+
composer = e_msg_composer_new_with_message (messages->pdata[i]);
+
if (composer) {
gtk_signal_connect (GTK_OBJECT (composer), "send",
composer_send_cb, NULL);
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,