aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-06-01 18:20:12 +0800
committerMilan Crha <mcrha@redhat.com>2010-06-01 18:20:12 +0800
commitb3f8d47878836a47e12f744d11d3ce467c82a566 (patch)
treefe3a45a5fe8d8bca21f93619d6b8155e327150f2 /mail
parente1ea08f0fcba663fc9d5160e8a47af37d7c06946 (diff)
downloadgsoc2013-evolution-b3f8d47878836a47e12f744d11d3ce467c82a566.tar.gz
gsoc2013-evolution-b3f8d47878836a47e12f744d11d3ce467c82a566.tar.zst
gsoc2013-evolution-b3f8d47878836a47e12f744d11d3ce467c82a566.zip
Revert of patch for bug #585577
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-ops.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index e3ab0d5b97..128cb28c9c 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -515,42 +515,8 @@ mail_send_message (struct _send_queue_msg *m, CamelFolder *queue, const gchar *u
if (resent_from) {
camel_address_decode (from, resent_from);
} else {
- /* Don't get the 'from' from the headers */
- /* See https://bugzilla.gnome.org/show_bug.cgi?id=585577 */
- gchar *fake_msgid;
- gchar *hostname;
- EAccount *account;
- gchar *address;
- gchar *cp;
-
- /* We use camel_header_msgid_generate () to get a canonical
- * hostname, then skip the part leading to '@' */
- fake_msgid = camel_header_msgid_generate ();
- hostname = strchr (fake_msgid, '@');
- hostname++;
-
- /* wfm but it should probably be getpwent->pw_name instead */
- account = e_get_default_account ();
- if (!account) {
- /* XXX Not sure what we should do here. */
- address = g_strdup ("fakename");
- } else {
- address = g_strdup (
- e_account_get_string (
- account, E_ACCOUNT_ID_ADDRESS));
- cp = strchr (address, '@');
- if (cp != NULL)
- *cp = '\0';
- }
-
- cp = g_strconcat (address, "@", hostname, NULL);
- g_free (address);
- address = cp;
-
- camel_address_decode (from, address);
-
- g_free (fake_msgid);
- g_free (address);
+ iaddr = camel_mime_message_get_from (message);
+ camel_address_copy (from, CAMEL_ADDRESS (iaddr));
}
recipients = (CamelAddress *) camel_internet_address_new ();