aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-06-29 04:35:43 +0800
committerPeter Williams <peterw@src.gnome.org>2001-06-29 04:35:43 +0800
commit6ffa930086b903dbd8fed3543f5e4ed762b6e8d1 (patch)
tree805bc825e07162f42996776921d770efe44b4b69 /camel/providers
parentdacae0532fb39cee00b4f8ccfa8157d3a31b3a80 (diff)
downloadgsoc2013-evolution-6ffa930086b903dbd8fed3543f5e4ed762b6e8d1.tar.gz
gsoc2013-evolution-6ffa930086b903dbd8fed3543f5e4ed762b6e8d1.tar.zst
gsoc2013-evolution-6ffa930086b903dbd8fed3543f5e4ed762b6e8d1.zip
Add a CamelMimeFilterStripHeader that removes a header from mime output. Used
by sendmail to strip the BCC from the email while still sending to the BCC recipients. camel: 2001-06-28 Peter Williams <peterw@ximian.com> * camel-mime-filter-stripheader.c: New file. Filter that strips a header from mime output. * camel-mime-filter-stripheader.h: New file. Header for the above. * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader filter to remove the "Bcc" header. * Makefile.am: Add the stripheader files. * tests/lib/Makefile.am (INCLUDES): Get this to compile again. * tests/mime-filter/test-stripheader.c: New file. Test suite for the CamelMimeFilterStripHeader. * tests/mime-filter/Makefile.am: New test section: mime filters. mail: 2001-06-28 Peter Williams <peterw@ximian.com> * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal; this unsets the BCC recipients and so doesn't send to the Bcc'd people at all. svn path=/trunk/; revision=10576
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 48b4250185..cf11499074 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -40,6 +40,7 @@
#undef MIN
#undef MAX
#include "camel-mime-filter-crlf.h"
+#include "camel-mime-filter-stripheader.h"
#include "camel-mime-filter-linewrap.h"
#include "camel-stream-filter.h"
#include "camel-smtp-transport.h"
@@ -911,7 +912,7 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, gboolean has_8bi
/* now we can actually send what's important :p */
gchar *cmdbuf, *respbuf = NULL;
CamelStreamFilter *filtered_stream;
- CamelMimeFilter *crlffilter;
+ CamelMimeFilter *crlffilter, *bccfilter;
/* if the message contains 8bit mime parts and the server
doesn't support it, encode 8bit parts to the best
@@ -955,7 +956,9 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, gboolean has_8bi
/* setup stream filtering */
crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
+ bccfilter = camel_mime_filter_stripheader_new ("Bcc");
filtered_stream = camel_stream_filter_new_with_stream (transport->ostream);
+ camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (bccfilter));
camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (filtered_stream)) == -1) {