aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-12-09 08:58:46 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-12-09 08:58:46 +0800
commit1907e8767d37ca3fd04482eaa5635cefe41732e4 (patch)
treea11ad245e4749fcc776d94d8b558292118b3fc2c /camel/providers/smtp
parente6ab1ee937018dd296638091e695cf22e4776655 (diff)
downloadgsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar.gz
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar.bz2
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar.lz
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar.xz
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.tar.zst
gsoc2013-evolution-1907e8767d37ca3fd04482eaa5635cefe41732e4.zip
encode the address before sending it out, rather than using the raw/utf8
2003-12-09 Not Zed <NotZed@Ximian.com> * 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 <NotZed@Ximian.com> * 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 <NotZed@Ximian.com> * 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
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c9
1 files changed, 7 insertions, 2 deletions
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)) {