aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-05-29 01:36:31 +0800
committerDan Winship <danw@src.gnome.org>2000-05-29 01:36:31 +0800
commitfbd1a80e319890c83423912913238a63f0478424 (patch)
treef9a78116c4206755a30dfc5c2f6899d6e0edd3fb
parentdd4eb1738f82647b4ef4cf93e73c2cd4d5349456 (diff)
downloadgsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.gz
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.bz2
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.lz
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.xz
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.zst
gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.zip
Use `foo@bar' rather than `<foo@bar>' for recipient with no name.
* mail-format.c (write_recipients_to_stream): Use `foo@bar' rather than `<foo@bar>' for recipient with no name. svn path=/trunk/; revision=3247
-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);
}