aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-10-06 07:20:52 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-10-06 07:20:52 +0800
commit00a9e302ae4dff489ee1056b04979db20bb49358 (patch)
tree3f257a0c169ff3030ea57ad0fb844ceb0ddd1ba8
parent812dd019e0a4645182592c0f1b8d78bd0b71be04 (diff)
downloadgsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar.gz
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar.bz2
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar.lz
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar.xz
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.tar.zst
gsoc2013-evolution-00a9e302ae4dff489ee1056b04979db20bb49358.zip
Use the camel_address_encode function again.
2000-10-05 Jeffrey Stedfast <fejj@helixcode.com> * camel-mime-message.c (camel_mime_message_set_reply_to): Use the camel_address_encode function again. (camel_mime_message_set_from): Same. svn path=/trunk/; revision=5756
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-mime-message.c24
2 files changed, 26 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 7d27bba261..188fffb39f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,11 @@
2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
+ * camel-mime-message.c (camel_mime_message_set_reply_to): Use the
+ camel_address_encode function again.
+ (camel_mime_message_set_from): Same.
+
+2000-10-05 Jeffrey Stedfast <fejj@helixcode.com>
+
* camel-mime-utils.c (quoted_encode_step): Modified to not encode
space chars in the middle of a line.
(isblank): New macro if we're not on a system with the GNU isblank
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 690f655ca3..fd199f600d 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -239,6 +239,9 @@ camel_mime_message_get_sent_date (CamelMimeMessage *message)
void
camel_mime_message_set_reply_to (CamelMimeMessage *mime_message, const gchar *reply_to)
{
+ CamelInternetAddress *cia;
+ char *addr;
+
g_assert (mime_message);
/* FIXME: check format of string, handle it nicer ... */
@@ -246,8 +249,13 @@ camel_mime_message_set_reply_to (CamelMimeMessage *mime_message, const gchar *re
g_free (mime_message->reply_to);
mime_message->reply_to = g_strstrip (g_strdup (reply_to));
- CAMEL_MEDIUM_CLASS (parent_class)->set_header (CAMEL_MEDIUM (mime_message), "Reply-To",
- mime_message->reply_to);
+ cia = camel_internet_address_new ();
+ camel_address_decode (CAMEL_ADDRESS (cia), mime_message->reply_to);
+ addr = camel_address_encode (CAMEL_ADDRESS (cia));
+
+ CAMEL_MEDIUM_CLASS (parent_class)->set_header (CAMEL_MEDIUM (mime_message), "Reply-To", addr);
+ camel_object_unref (CAMEL_OBJECT (cia));
+ g_free (addr);
}
const gchar *
@@ -285,6 +293,9 @@ camel_mime_message_get_subject (CamelMimeMessage *mime_message)
void
camel_mime_message_set_from (CamelMimeMessage *mime_message, const gchar *from)
{
+ CamelInternetAddress *cia;
+ char *addr;
+
g_assert (mime_message);
/* FIXME: check format of string, handle it nicer ... */
@@ -292,8 +303,13 @@ camel_mime_message_set_from (CamelMimeMessage *mime_message, const gchar *from)
g_free (mime_message->from);
mime_message->from = g_strstrip (g_strdup (from));
- CAMEL_MEDIUM_CLASS (parent_class)->set_header (CAMEL_MEDIUM (mime_message), "From",
- mime_message->from);
+ cia = camel_internet_address_new ();
+ camel_address_decode (CAMEL_ADDRESS (cia), mime_message->from);
+
+ addr = camel_address_encode (CAMEL_ADDRESS (cia));
+ CAMEL_MEDIUM_CLASS (parent_class)->set_header (CAMEL_MEDIUM (mime_message), "From", addr);
+ camel_object_unref (CAMEL_OBJECT (cia));
+ g_free (addr);
}
const gchar *