aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-format.c18
2 files changed, 15 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 557cadf3e8..169f836809 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
2000-05-28 Dan Winship <danw@helixcode.com>
+ * mail-format.c (write_recipients_to_stream): Use `foo@bar' rather
+ than `<foo@bar>' for recipient with no name.
+
* mail-ops.c (fetch_mail): don't put up an error message if the
user cancels the password dialog.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 1e90dbf6dc..429e94f2d0 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -360,12 +360,18 @@ write_recipients_to_stream (const gchar *recipient_type,
i = 0;
while (camel_internet_address_get (recipients, i++, &name, &addr)) {
char *old_string = recipients_string;
- recipients_string =
- g_strdup_printf ("%s%s%s%s%s <%s>",
- old_string ? old_string : "",
- old_string ? ", " : "",
- *name ? "\"" : "", name,
- *name ? "\"" : "", addr);
+
+ if (*name) {
+ recipients_string = g_strdup_printf (
+ "%s%s\"%s\" <%s>",
+ old_string ? old_string : "",
+ old_string ? ", " : "",
+ name, addr);
+ } else {
+ recipients_string = g_strdup_printf (
+ "%s%s%s", old_string ? old_string : "",
+ old_string ? ", " : "", addr);
+ }
g_free (old_string);
}