aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-24 14:18:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-24 14:18:36 +0800
commit2131710f7575b2b549066e9af5f6f2fd399345df (patch)
tree9cf9390e2da9a6c00b6b627a65ab273047ab023a /mail/mail-ops.c
parentc1dee244344d21d22213d97a62c3139d9607473b (diff)
downloadgsoc2013-evolution-2131710f7575b2b549066e9af5f6f2fd399345df.tar.gz
gsoc2013-evolution-2131710f7575b2b549066e9af5f6f2fd399345df.tar.zst
gsoc2013-evolution-2131710f7575b2b549066e9af5f6f2fd399345df.zip
Commit a fix that I thought I committed a while ago:
2002-07-24 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (handle_multipart_encrypted): Commit a fix that I thought I committed a while ago: * mail-format.c (handle_multipart_encrypted): Pass the correct pointer into camel_multipart_encrypted_decrypt(). * mail-ops.c (mail_send_message): Rework the logic a bit. If we find an account, use that to set the sent_folder_uri and the transport_url, otherwise use the X-Evolution-Transport and X-Evolution-Fcc headers. svn path=/trunk/; revision=17566
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index dd69f923a2..f5dc731dde 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -447,6 +447,7 @@ static void
mail_send_message (CamelMimeMessage *message, const char *destination,
CamelFilterDriver *driver, CamelException *ex)
{
+ const MailConfigAccount *account = NULL;
const CamelInternetAddress *iaddr;
CamelAddress *from, *recipients;
CamelMessageInfo *info;
@@ -466,21 +467,28 @@ mail_send_message (CamelMimeMessage *message, const char *destination,
xev = mail_tool_remove_xevolution_headers (message);
if (xev->account) {
- const MailConfigAccount *account;
char *name;
name = g_strstrip (g_strdup (xev->account));
account = mail_config_get_account_by_name (name);
g_free (name);
- if (account && account->transport && account->transport->url)
- transport_url = g_strdup (account->transport->url);
- } else if (xev->transport) {
- transport_url = g_strstrip (g_strdup (xev->transport));
+ if (account) {
+ if (account->transport && account->transport->url)
+ transport_url = g_strdup (account->transport->url);
+
+ sent_folder_uri = g_strdup (account->sent_folder_uri);
+ }
}
- if (xev->fcc)
- sent_folder_uri = g_strstrip (g_strdup (xev->fcc));
+ if (!account) {
+ /* default back to these headers */
+ if (xev->transport)
+ transport_url = g_strstrip (g_strdup (xev->transport));
+
+ if (xev->fcc)
+ sent_folder_uri = g_strstrip (g_strdup (xev->fcc));
+ }
xport = camel_session_get_transport (session, transport_url ? transport_url : destination, ex);
g_free (transport_url);