aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-13 13:59:32 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-13 13:59:32 +0800
commitf88c5b4073c70a294157094d2108795c3f160d32 (patch)
treeb5deabcacf24d91a4f70d144ff8136cd7b64958a /mail/mail-ops.c
parent771f82cebe9a0113e75bc58db3eb8fde3878ed6b (diff)
downloadgsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar.gz
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar.bz2
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar.lz
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar.xz
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.tar.zst
gsoc2013-evolution-f88c5b4073c70a294157094d2108795c3f160d32.zip
Get the X-Evolution-Transport URL and use that if it exists, else fall
2001-01-13 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (do_send_queue): Get the X-Evolution-Transport URL and use that if it exists, else fall back on the default transport. * mail-callbacks.c (composer_postpone_cb): Set an X-Evolution-Transport header. svn path=/trunk/; revision=7474
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 6dec663e7b..27351fe700 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -701,6 +701,7 @@ do_send_queue (gpointer in_data, gpointer op_data, CamelException *ex)
for (i = 0; i < uids->len; i++) {
CamelMimeMessage *message;
+ char *transport_url = NULL;
message = camel_folder_get_message (input->folder_queue, uids->pdata[i], ex);
if (camel_exception_is_set (ex))
@@ -710,7 +711,14 @@ do_send_queue (gpointer in_data, gpointer op_data, CamelException *ex)
camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- xport = camel_session_get_transport (session, input->xport_uri, ex);
+ /* Get the preferred transport URI */
+ transport_url = g_strdup (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport"));
+ if (transport_url)
+ camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution-Transport");
+
+ xport = camel_session_get_transport (session, transport_url ? transport_url : input->xport_uri, ex);
+ g_free (transport_url);
+
if (camel_exception_is_set (ex))
break;