aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-internet-address.c8
-rw-r--r--camel/camel-mime-message.c3
3 files changed, 14 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 33c5b6714a..4e54f475db 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2000-07-25 Dan Winship <danw@helixcode.com>
+
+ * camel-mime-message.c (write_to_stream): Don't add a Mime-Version
+ header to a message that already has one.
+
+ * camel-internet-address.c (internet_encode): Don't put <>s around
+ addresses with no name part.
+
2000-07-25 Peter Williams <peterw@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Set
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 003cae5b48..9abbc8c632 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -129,11 +129,11 @@ static char * internet_encode (CamelAddress *a)
if (i!=0)
g_string_append(out, ", ");
- if (name) {
- g_string_sprintfa(out, "%s ", name);
+ if (name && *name) {
+ g_string_sprintfa(out, "%s <%s>", name, addr->address);
g_free(name);
- }
- g_string_sprintfa(out, "<%s>", addr->address);
+ } else
+ g_string_sprintfa(out, "%s", addr->address);
}
ret = out->str;
g_string_free(out, FALSE);
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 1a31fc1ea1..e511fece7a 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -445,7 +445,8 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
/* FIXME: "To" header needs to be set explicitly as well ... */
- camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
+ if (!camel_medium_get_header ((CamelMedium *)mm, "Mime-Version"))
+ camel_medium_set_header((CamelMedium *)mm, "Mime-Version", "1.0");
return CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_stream (data_wrapper, stream);
}