diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 13 | ||||
-rw-r--r-- | mail/mail-format.c | 5 | ||||
-rw-r--r-- | mail/mail-ops.c | 22 |
3 files changed, 31 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c3ec3dbb33..340e595bf7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,16 @@ +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. + 2002-07-23 Jeffrey Stedfast <fejj@ximian.com> * message-tag-followup.c (message_tag_followup_decode): Don't use diff --git a/mail/mail-format.c b/mail/mail-format.c index ddd57aca5b..693721bb3c 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1743,6 +1743,7 @@ static gboolean handle_multipart_encrypted (CamelMimePart *part, const char *mime_type, MailDisplay *md, GtkHTML *html, GtkHTMLStream *stream) { + CamelMultipartEncrypted *mpe; CamelMimePart *mime_part; CamelCipherContext *cipher; CamelDataWrapper *wrapper; @@ -1755,11 +1756,11 @@ handle_multipart_encrypted (CamelMimePart *part, const char *mime_type, wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part)); - g_assert (CAMEL_IS_MULTIPART (wrapper)); + mpe = CAMEL_MULTIPART_ENCRYPTED (wrapper); camel_exception_init (&ex); cipher = mail_crypto_get_pgp_cipher_context (NULL); - mime_part = camel_multipart_encrypted_decrypt (CAMEL_MULTIPART_ENCRYPTED (wrapper), cipher, &ex); + mime_part = camel_multipart_encrypted_decrypt (mpe, cipher, &ex); camel_object_unref (cipher); if (camel_exception_is_set (&ex)) { 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); |