diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 6 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 36 |
2 files changed, 33 insertions, 9 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index b8991e1a98..da653450c2 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,5 +1,11 @@ 2000-11-01 Jeffrey Stedfast <fejj@helixcode.com> + * e-msg-composer.c (e_msg_composer_new_with_message): Don't create + the To, Cc, and Bcc lists based only on the address, use both the + name and address and camel_address_encode() them. + +2000-11-01 Jeffrey Stedfast <fejj@helixcode.com> + * e-msg-composer-attachment-bar.c (attach_to_multipart): Fix the CTE kludge, calculate the best mime transfer encoding for the mime part and use that. Include e-msg-composer-select-file.h diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 28b9eb7fac..59cdf40a38 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1447,26 +1447,44 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) len = CAMEL_ADDRESS (to)->addresses->len; for (i = 0; i < len; i++) { - const char *addr; + const char *name, *addr; - if (camel_internet_address_get (to, i, NULL, &addr)) - To = g_list_append (To, g_strdup (addr)); + if (camel_internet_address_get (to, i, &name, &addr)) { + CamelInternetAddress *cia; + + cia = camel_internet_address_new (); + camel_internet_address_add (cia, name, addr); + To = g_list_append (To, camel_address_encode (CAMEL_ADDRESS (cia))); + camel_object_unref (CAMEL_OBJECT (cia)); + } } len = CAMEL_ADDRESS (cc)->addresses->len; for (i = 0; i < len; i++) { - const char *addr; + const char *name, *addr; - if (camel_internet_address_get (cc, i, NULL, &addr)) - Cc = g_list_append (Cc, g_strdup (addr)); + if (camel_internet_address_get (to, i, &name, &addr)) { + CamelInternetAddress *cia; + + cia = camel_internet_address_new (); + camel_internet_address_add (cia, name, addr); + Cc = g_list_append (Cc, camel_address_encode (CAMEL_ADDRESS (cia))); + camel_object_unref (CAMEL_OBJECT (cia)); + } } len = CAMEL_ADDRESS (bcc)->addresses->len; for (i = 0; i < len; i++) { - const char *addr; + const char *name, *addr; - if (camel_internet_address_get (bcc, i, NULL, &addr)) - Bcc = g_list_append (Bcc, g_strdup (addr)); + if (camel_internet_address_get (to, i, &name, &addr)) { + CamelInternetAddress *cia; + + cia = camel_internet_address_new (); + camel_internet_address_add (cia, name, addr); + Bcc = g_list_append (Bcc, camel_address_encode (CAMEL_ADDRESS (cia))); + camel_object_unref (CAMEL_OBJECT (cia)); + } } e_msg_composer_set_headers (new, To, Cc, Bcc, subject); |