diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-06-22 05:25:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-06-22 05:25:55 +0800 |
commit | c7fa0c5ad10846d094e598cd607b2765c0ccda3f (patch) | |
tree | bbc805af126cdf6602e617cf121ec5da68aa5369 /mail/mail-ops.c | |
parent | fce00ebfea15dc83de4afb277935c8f48781d009 (diff) | |
download | gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar.gz gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar.bz2 gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar.lz gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar.xz gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.tar.zst gsoc2013-evolution-c7fa0c5ad10846d094e598cd607b2765c0ccda3f.zip |
Temporarily remove the Bcc header before sending the message.
2001-06-21 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (mail_send_message): Temporarily remove the Bcc
header before sending the message.
svn path=/trunk/; revision=10385
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index f79857de69..acf5bbbd1b 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -420,7 +420,8 @@ struct _update_info { void *data; }; -static void do_update_subfolders_rec(CamelStore *store, CamelFolderInfo *info, EvolutionStorage *storage, const char *prefix) +static void +do_update_subfolders_rec (CamelStore *store, CamelFolderInfo *info, EvolutionStorage *storage, const char *prefix) { char *path, *name; @@ -439,7 +440,8 @@ static void do_update_subfolders_rec(CamelStore *store, CamelFolderInfo *info, E g_free(path); } -static void do_update_subfolders(CamelStore *store, CamelFolderInfo *info, void *data) +static void +do_update_subfolders (CamelStore *store, CamelFolderInfo *info, void *data) { struct _update_info *uinfo = data; @@ -455,8 +457,9 @@ static void do_update_subfolders(CamelStore *store, CamelFolderInfo *info, void } /* this interface is a little icky */ -int mail_update_subfolders(CamelStore *store, EvolutionStorage *storage, - void (*done)(CamelStore *, void *data), void *data) +int +mail_update_subfolders (CamelStore *store, EvolutionStorage *storage, + void (*done)(CamelStore *, void *data), void *data) { struct _update_info *info; @@ -485,7 +488,7 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte CamelTransport *xport = NULL; CamelFolder *folder; const char *version, *header; - gchar *acct_header; + gchar *acct_header, *bcc_header; char *transport_url = NULL, *sent_folder_uri = NULL; if (SUB_VERSION[0] == '\0') @@ -530,6 +533,9 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte } } + bcc_header = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "Bcc")); + camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc"); + xport = camel_session_get_transport (session, transport_url ? transport_url : destination, ex); g_free (transport_url); if (!xport) { @@ -547,13 +553,19 @@ 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); } + /* Re-attach the Bcc header */ + if (bcc_header) { + camel_medium_add_header (CAMEL_MEDIUM (message), "Bcc", bcc_header); + g_free (bcc_header); + } + if (driver) camel_filter_driver_filter_message (driver, message, info, NULL, NULL, NULL, "", ex); |