From 1907e8767d37ca3fd04482eaa5635cefe41732e4 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 9 Dec 2003 00:58:46 +0000 Subject: encode the address before sending it out, rather than using the raw/utf8 2003-12-09 Not Zed * providers/smtp/camel-smtp-transport.c (smtp_send_to): encode the address before sending it out, rather than using the raw/utf8 version. * camel-internet-address.c (camel_internet_address_encode_address): check for quoting the local part of the address before outputting it. (cia_encode_addrspec): quote local part if need be. (camel_internet_address_encode_address): make folding optional based on whether inlen is null or not. * camel-mime-utils.[ch]: rename is_* to camel_mime_is_* and export the type functions. 2003-12-08 Not Zed * providers/imap/camel-imap-utils.c (imap_atom_specials): add } to the atom specials list. This isn't correct, but some busted servers expect it. Bug #50728. 2003-12-02 Not Zed * providers/local/camel-local-folder.c (local_setv): remove some debug printfs. ** See bug #51576. * camel-url.c (camel_url_decode): robustify url decoding for bad input, addresses a crash. svn path=/trunk/; revision=23676 --- camel/providers/smtp/camel-smtp-transport.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'camel/providers/smtp/camel-smtp-transport.c') diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index b8dbaa6c1c..5bf5add2ee 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -710,17 +710,22 @@ smtp_send_to (CamelTransport *transport, CamelMimeMessage *message, cia = CAMEL_INTERNET_ADDRESS (recipients); for (i = 0; i < len; i++) { + char *enc; + if (!camel_internet_address_get (cia, i, NULL, &addr)) { camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot send message: one or more invalid recipients")); camel_operation_end (NULL); return FALSE; } - - if (!smtp_rcpt (smtp_transport, addr, ex)) { + + enc = camel_internet_address_encode_address(NULL, NULL, addr); + if (!smtp_rcpt (smtp_transport, enc, ex)) { + g_free(enc); camel_operation_end (NULL); return FALSE; } + g_free(enc); } if (!smtp_data (smtp_transport, message, ex)) { -- cgit v1.2.3