From 23d300e9fa624e56f55ab3446b01cbf8908d6ceb Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 25 May 2000 03:17:43 +0000 Subject: 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 --- mail/ChangeLog | 5 +++++ mail/mail-ops.c | 11 ++++++++--- 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 + + * mail-ops.c (composer_send_cb): connect to and disconnect from + the transport. + 2000-05-24 Christopher James Lahey * 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)); } -- cgit