aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-02-23 09:23:43 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-02-23 09:23:43 +0800
commita9d623d22fdcf65d759e968f51c33234ac63b60d (patch)
tree109672ef61bdb82756a5328292b9a61eba5b1dde /camel/providers/smtp
parent9e2cde2a1da215fdc8a5e451e4f93ba8761a4420 (diff)
downloadgsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar.gz
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar.bz2
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar.lz
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar.xz
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.tar.zst
gsoc2013-evolution-a9d623d22fdcf65d759e968f51c33234ac63b60d.zip
Remove all Bcc headers before sending to the smtp server.
2003-02-22 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Remove all Bcc headers before sending to the smtp server. * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to): Remove all Bcc headers before sending to sendmail. svn path=/trunk/; revision=20000
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 6361dcd7a8..561ccbc4c5 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -1226,7 +1226,7 @@ smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean ha
CamelStreamFilter *filtered_stream;
CamelMimeFilter *crlffilter;
struct _header_raw *header;
- GSList *h, *bcc = NULL;
+ GSList *n, *bcc = NULL;
int ret;
/* if the message contains 8bit/binary mime parts and the server
@@ -1290,20 +1290,22 @@ smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean ha
header = header->next;
}
- camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc");
+ n = bcc;
+ while (n) {
+ camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc");
+ n = n->next;
+ }
/* write the message */
ret = camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (filtered_stream));
/* add the bcc headers back */
- if (bcc) {
- h = bcc;
- while (h) {
- camel_medium_add_header (CAMEL_MEDIUM (message), "Bcc", h->data);
- g_free (h->data);
- h = h->next;
- }
- g_slist_free (bcc);
+ while (bcc) {
+ n = bcc->next;
+ camel_medium_add_header (CAMEL_MEDIUM (message), "Bcc", bcc->data);
+ g_free (bcc->data);
+ g_slist_free1 (bcc);
+ bcc = n;
}
if (ret == -1) {