aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/e-mail-session-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/e-mail-session-utils.c')
-rw-r--r--libemail-engine/e-mail-session-utils.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libemail-engine/e-mail-session-utils.c b/libemail-engine/e-mail-session-utils.c
index ce400c4d10..da54b7640d 100644
--- a/libemail-engine/e-mail-session-utils.c
+++ b/libemail-engine/e-mail-session-utils.c
@@ -552,6 +552,14 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
return;
}
+ provider = camel_service_get_provider (service);
+ if ((provider->flags & CAMEL_PROVIDER_IS_REMOTE) != 0 &&
+ !camel_session_get_online (CAMEL_SESSION (session))) {
+ /* silently ignore */
+ g_object_unref (service);
+ return;
+ }
+
status = camel_service_get_connection_status (service);
if (status != CAMEL_SERVICE_CONNECTED) {
did_connect = TRUE;
@@ -566,8 +574,6 @@ mail_session_send_to_thread (GSimpleAsyncResult *simple,
}
}
- provider = camel_service_get_provider (service);
-
if (provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)
copy_to_sent = FALSE;