aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-05-25 11:17:43 +0800
committerDan Winship <danw@src.gnome.org>2000-05-25 11:17:43 +0800
commit23d300e9fa624e56f55ab3446b01cbf8908d6ceb (patch)
treea82c2980f71f2f33361254a5086c40bea97a8eeb
parent1550b3384b3837d8b7aa6a7f50df179d98cdd265 (diff)
downloadgsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar.gz
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar.bz2
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar.lz
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar.xz
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.tar.zst
gsoc2013-evolution-23d300e9fa624e56f55ab3446b01cbf8908d6ceb.zip
connect to and disconnect from the transport.
* mail-ops.c (composer_send_cb): connect to and disconnect from the transport. svn path=/trunk/; revision=3197
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a9d44019fc..37c96cc2dc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-24 Dan Winship <danw@helixcode.com>
+
+ * mail-ops.c (composer_send_cb): connect to and disconnect from
+ the transport.
+
2000-05-24 Christopher James Lahey <clahey@helixcode.com>
* Makefile.am: Added libepaned.a.
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 90acb9e84d..16d045f1b0 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -312,22 +312,27 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
}
message = e_msg_composer_get_message (composer);
+ gtk_object_destroy (GTK_OBJECT (composer));
camel_mime_message_set_from (message, from);
camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer",
"Evolution (Developer Preview)");
camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
- camel_transport_send (transport, CAMEL_MEDIUM (message), ex);
- if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
+ camel_service_connect (CAMEL_SERVICE (transport), ex);
+ if (!camel_exception_is_set (ex))
+ camel_transport_send (transport, CAMEL_MEDIUM (message), ex);
+ if (!camel_exception_is_set (ex))
+ camel_service_disconnect (CAMEL_SERVICE (transport), ex);
+ if (camel_exception_is_set (ex)) {
mail_exception_dialog ("Could not send message", ex, composer);
camel_exception_free (ex);
gtk_object_unref (GTK_OBJECT (message));
return;
}
+ camel_exception_free (ex);
gtk_object_unref (GTK_OBJECT (message));
- gtk_object_destroy (GTK_OBJECT (composer));
}