aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2000-12-11 19:40:15 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-12-11 19:40:15 +0800
commit1c95a1e9859e02781267975b821b9f62467b79d0 (patch)
tree9273fed0890c9a444ea9c7ff7044cff91a2a4c6b /camel/providers/smtp
parentc08e99018cacc660a1995507b8d505f45f41cc95 (diff)
downloadgsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.gz
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.bz2
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.lz
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.xz
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.tar.zst
gsoc2013-evolution-1c95a1e9859e02781267975b821b9f62467b79d0.zip
Remove use of linewrap filter. Headers are now wrapped. encode_8bit
* providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of linewrap filter. Headers are now wrapped. encode_8bit already enforces a 998 octet line limit. (smtp_data): Also fixed a memleak, we always have to unref our own copy of the filters. We also dont need to remove them manually, so dont bother. The type's an int too ... * camel-internet-address.c (internet_unformat): When scanning past quotes, remove them also. (camel_internet_address_format_address): If the name contains "'s, or ','s then strip and quotes and wrap the whole lot in one set of quotes. * Makefile.am (noinst_HEADERS): We dont want to install camel-charset-map-private.h, ever. There are probably other similar files ..? * camel-mime-part.c (write_to_stream): Fold header lines appropriately as we're writing them out. * camel-mime-utils.c (header_fold): Add a new argument, headerlen, tells it how long the associated header token is. (header_fold): Also,k check to see if we need to fold first, using a better algorithm, and also accept already-folded lines, and re-process accordingly. (rfc2047_decode_word): Add a little buffer space to iconv output for shifting overheads? (rfc2047_decode_word): finish the iconv with a null call, to flush shift state, etc. (rfc2047_encode_word): Attempt to break up long words into appropriately sized, independent, chunks. See rfc2047, section 2. (header_decode_mailbox): Dont add in extra spaces into the output if we are decoding adjacent encoded words. We can only guess this case, as some broken mailers put encoded words inside quoted words. (header_encode_phrase): Dont merge words if they are going to end up too long. Also change back ot only merge consecutive words of the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or 'iam an. idiot' -> iam "an." idiot svn path=/trunk/; revision=6902
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index a4115c60e8..2d20cadce8 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -599,13 +599,11 @@ 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, *lwfilter;
- gint crlfid, lwid;
-
+ CamelMimeFilter *crlffilter;
/* if the message contains 8bit mime parts and the server
doesn't support it, encode 8bit parts to the best
- encoding. */
+ encoding. This will also enforce an encoding to keep the lines in limit */
if (has_8bit_parts && !CAMEL_TRANSPORT (transport)->supports_8bit)
camel_mime_message_encode_8bit_parts (CAMEL_MIME_MESSAGE (message));
@@ -641,12 +639,9 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, gboolean has_8bi
respbuf = NULL;
/* setup stream filtering */
- lwfilter = camel_mime_filter_linewrap_new (998, 998, '\t');
crlffilter = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE, CAMEL_MIME_FILTER_CRLF_MODE_CRLF_DOTS);
-
filtered_stream = camel_stream_filter_new_with_stream (transport->ostream);
- lwid = camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (lwfilter));
- crlfid = camel_stream_filter_add (filtered_stream, CAMEL_MIME_FILTER (crlffilter));
+ 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) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -654,15 +649,11 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, gboolean has_8bi
"%s: mail not sent"),
g_strerror (errno));
- camel_stream_filter_remove (filtered_stream, lwid);
- camel_stream_filter_remove (filtered_stream, crlfid);
camel_object_unref (CAMEL_OBJECT (filtered_stream));
return FALSE;
}
- camel_stream_filter_remove (filtered_stream, lwid);
- camel_stream_filter_remove (filtered_stream, crlfid);
camel_stream_flush (CAMEL_STREAM (filtered_stream));
camel_object_unref (CAMEL_OBJECT (filtered_stream));