diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
index 61c467e..b49e2ea 100644
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@ -38,6 +38,11 @@
 
 #define d(x)
 
+enum {
+	PROP_0,
+	PROP_ONLINE
+};
+
 G_DEFINE_TYPE (CamelDiscoStore, camel_disco_store, CAMEL_TYPE_STORE)
 
 static void
@@ -53,6 +58,8 @@ disco_store_update_status (CamelDiscoStore *disco)
 			disco->status = CAMEL_DISCO_STORE_OFFLINE;
 			break;
 	}
+
+	g_object_notify (G_OBJECT (disco), "online");
 }
 
 static void
@@ -82,6 +89,23 @@ disco_store_constructed (GObject *object)
 	g_object_unref (session);
 }
 
+static void
+disco_store_store_get_property (GObject *object,
+				guint property_id,
+				GValue *value,
+				GParamSpec *pspec)
+{
+	switch (property_id) {
+		case PROP_ONLINE:
+			g_value_set_boolean (
+				value, camel_disco_store_status (
+				CAMEL_DISCO_STORE (object)) == CAMEL_DISCO_STORE_ONLINE);
+			return;
+	}
+
+	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
 static gboolean
 disco_store_connect_sync (CamelService *service,
                           GCancellable *cancellable,
@@ -122,6 +146,7 @@ disco_store_connect_sync (CamelService *service,
 		camel_disco_diary_replay (diary, cancellable, &local_error);
 		g_object_unref (diary);
 		store->status = CAMEL_DISCO_STORE_ONLINE;
+		g_object_notify (G_OBJECT (store), "online");
 		if (local_error != NULL) {
 			g_propagate_error (error, local_error);
 			return FALSE;
@@ -341,6 +366,8 @@ disco_store_set_status (CamelDiscoStore *disco_store,
 
 	disco_store->status = status;
 
+	g_object_notify (G_OBJECT (disco_store), "online");
+
 	return camel_service_connect_sync (
 		CAMEL_SERVICE (disco_store), cancellable, error);
 }
@@ -354,6 +381,7 @@ camel_disco_store_class_init (CamelDiscoStoreClass *class)
 
 	object_class = G_OBJECT_CLASS (class);
 	object_class->constructed = disco_store_constructed;
+	object_class->get_property = disco_store_store_get_property;
 
 	service_class = CAMEL_SERVICE_CLASS (class);
 	service_class->settings_type = CAMEL_TYPE_OFFLINE_SETTINGS;
@@ -365,6 +393,16 @@ camel_disco_store_class_init (CamelDiscoStoreClass *class)
 	store_class->get_folder_info_sync = disco_store_get_folder_info_sync;
 
 	class->set_status = disco_store_set_status;
+
+	g_object_class_install_property (
+		object_class,
+		PROP_ONLINE,
+		g_param_spec_boolean (
+			"online",
+			"Online",
+			"Whether the store is online",
+			FALSE,
+			G_PARAM_READABLE));
 }
 
 static void
@@ -391,9 +429,12 @@ camel_disco_store_status (CamelDiscoStore *store)
 	session = camel_service_ref_session (service);
 
 	if (store->status != CAMEL_DISCO_STORE_OFFLINE
-	    && !camel_session_get_online (session))
+	    && !camel_session_get_online (session)) {
 		store->status = CAMEL_DISCO_STORE_OFFLINE;
 
+		g_object_notify (G_OBJECT (store), "online");
+	}
+
 	g_object_unref (session);
 
 	return store->status;
diff --git a/camel/camel-offline-store.c b/camel/camel-offline-store.c
index b4e8050..bc8f694 100644
--- a/camel/camel-offline-store.c
+++ b/camel/camel-offline-store.c
@@ -40,6 +40,11 @@ struct _CamelOfflineStorePrivate {
 	gboolean online;
 };
 
+enum {
+	PROP_0,
+	PROP_ONLINE
+};
+
 G_DEFINE_TYPE (CamelOfflineStore, camel_offline_store, CAMEL_TYPE_STORE)
 
 static void
@@ -60,6 +65,23 @@ offline_store_constructed (GObject *object)
 }
 
 static void
+offline_store_get_property (GObject *object,
+			    guint property_id,
+			    GValue *value,
+			    GParamSpec *pspec)
+{
+	switch (property_id) {
+		case PROP_ONLINE:
+			g_value_set_boolean (
+				value, camel_offline_store_get_online (
+				CAMEL_OFFLINE_STORE (object)));
+			return;
+	}
+
+	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+}
+
+static void
 camel_offline_store_class_init (CamelOfflineStoreClass *class)
 {
 	GObjectClass *object_class;
@@ -69,9 +91,20 @@ camel_offline_store_class_init (CamelOfflineStoreClass *class)
 
 	object_class = G_OBJECT_CLASS (class);
 	object_class->constructed = offline_store_constructed;
+	object_class->get_property = offline_store_get_property;
 
 	service_class = CAMEL_SERVICE_CLASS (class);
 	service_class->settings_type = CAMEL_TYPE_OFFLINE_SETTINGS;
+
+	g_object_class_install_property (
+		object_class,
+		PROP_ONLINE,
+		g_param_spec_boolean (
+			"online",
+			"Online",
+			"Whether the store is online",
+			FALSE,
+			G_PARAM_READABLE));
 }
 
 static void
@@ -142,6 +175,9 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
 	/* Returning to online mode is the simpler case. */
 	if (!store_is_online) {
 		store->priv->online = online;
+
+		g_object_notify (G_OBJECT (store), "online");
+
 		return camel_service_connect_sync (
 			service, cancellable, error);
 	}
@@ -183,6 +219,8 @@ camel_offline_store_set_online_sync (CamelOfflineStore *store,
 
 	store->priv->online = online;
 
+	g_object_notify (G_OBJECT (store), "online");
+
 	return success;
 }
 
diff --git a/camel/providers/sendmail/camel-sendmail-settings.c b/camel/providers/sendmail/camel-sendmail-settings.c
index 95d377f..e0c7878 100644
--- a/camel/providers/sendmail/camel-sendmail-settings.c
+++ b/camel/providers/sendmail/camel-sendmail-settings.c
@@ -29,6 +29,7 @@ struct _CamelSendmailSettingsPrivate {
 
 	gboolean use_custom_binary;
 	gboolean use_custom_args;
+	gboolean send_in_offline;
 };
 
 enum {
@@ -36,7 +37,8 @@ enum {
 	PROP_USE_CUSTOM_BINARY,
 	PROP_USE_CUSTOM_ARGS,
 	PROP_CUSTOM_BINARY,
-	PROP_CUSTOM_ARGS
+	PROP_CUSTOM_ARGS,
+	PROP_SEND_IN_OFFLINE
 };
 
 G_DEFINE_TYPE (CamelSendmailSettings, camel_sendmail_settings, CAMEL_TYPE_SETTINGS)
@@ -71,6 +73,12 @@ sendmail_settings_set_property (GObject *object,
 				CAMEL_SENDMAIL_SETTINGS (object),
 				g_value_get_string (value));
 			return;
+
+		case PROP_SEND_IN_OFFLINE:
+			camel_sendmail_settings_set_send_in_offline (
+				CAMEL_SENDMAIL_SETTINGS (object),
+				g_value_get_boolean (value));
+			return;
 	}
 
 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -110,6 +118,13 @@ sendmail_settings_get_property (GObject *object,
 				camel_sendmail_settings_dup_custom_args (
 				CAMEL_SENDMAIL_SETTINGS (object)));
 			return;
+
+		case PROP_SEND_IN_OFFLINE:
+			g_value_set_boolean (
+				value,
+				camel_sendmail_settings_get_send_in_offline (
+				CAMEL_SENDMAIL_SETTINGS (object)));
+			return;
 	}
 
 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -190,6 +205,18 @@ camel_sendmail_settings_class_init (CamelSendmailSettingsClass *class)
 			G_PARAM_READWRITE |
 			G_PARAM_CONSTRUCT |
 			G_PARAM_STATIC_STRINGS));
+
+	g_object_class_install_property (
+		object_class,
+		PROP_SEND_IN_OFFLINE,
+		g_param_spec_boolean (
+			"send-in-offline",
+			"Send in offline",
+			"Whether to allow message sending in offline mode",
+			TRUE,
+			G_PARAM_READWRITE |
+			G_PARAM_CONSTRUCT |
+			G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -446,3 +473,44 @@ camel_sendmail_settings_set_custom_args (CamelSendmailSettings *settings,
 
 	g_object_notify (G_OBJECT (settings), "custom-args");
 }
+
+/**
+ * camel_sendmail_settings_get_send_in_offline:
+ * @settings: a #CamelSendmailSettings
+ *
+ * Returns whether can send messages in offline mode.
+ *
+ * Returns: whether can send messages in offline mode
+ *
+ * Since: 3.10
+ **/
+gboolean
+camel_sendmail_settings_get_send_in_offline (CamelSendmailSettings *settings)
+{
+	g_return_val_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings), FALSE);
+
+	return settings->priv->send_in_offline;
+}
+
+/**
+ * camel_sendmail_settings_set_send_in_offline:
+ * @settings: a #CamelSendmailSettings
+ * @send_in_offline: whether can send messages in offline mode
+ *
+ * Sets whether can send messages in offline mode.
+ *
+ * Since: 3.10
+ **/
+void
+camel_sendmail_settings_set_send_in_offline (CamelSendmailSettings *settings,
+                                             gboolean send_in_offline)
+{
+	g_return_if_fail (CAMEL_IS_SENDMAIL_SETTINGS (settings));
+
+	if ((settings->priv->send_in_offline ? 1 : 0) == (send_in_offline ? 1 : 0))
+		return;
+
+	settings->priv->send_in_offline = send_in_offline;
+
+	g_object_notify (G_OBJECT (settings), "send-in-offline");
+}
diff --git a/camel/providers/sendmail/camel-sendmail-settings.h b/camel/providers/sendmail/camel-sendmail-settings.h
index c33d4ee..eec0a29 100644
--- a/camel/providers/sendmail/camel-sendmail-settings.h
+++ b/camel/providers/sendmail/camel-sendmail-settings.h
@@ -74,6 +74,10 @@ gchar *		camel_sendmail_settings_dup_custom_args		(CamelSendmailSettings *settin
 void		camel_sendmail_settings_set_custom_args		(CamelSendmailSettings *settings,
 								 const gchar *custom_args);
 
+gboolean	camel_sendmail_settings_get_send_in_offline	(CamelSendmailSettings *settings);
+void		camel_sendmail_settings_set_send_in_offline	(CamelSendmailSettings *settings,
+								 gboolean send_in_offline);
+
 G_END_DECLS
 
 #endif /* CAMEL_SENDMAIL_SETTINGS_H */
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index 4d653a6..c0c0bbb 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -134,11 +134,31 @@ sendmail_send_to_sync (CamelTransport *transport,
 	success = camel_internet_address_get (
 		CAMEL_INTERNET_ADDRESS (from), 0, NULL, &from_addr);
 
-	if (!success)
+	if (!success) {
+		g_set_error (
+			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+			_("Failed to read From address"));
 		return FALSE;
+	}
 
 	settings = CAMEL_SENDMAIL_SETTINGS (camel_service_ref_settings (CAMEL_SERVICE (transport)));
 
+	if (!camel_sendmail_settings_get_send_in_offline (settings)) {
+		CamelSession *session;
+		gboolean is_online;
+
+		session = camel_service_ref_session (CAMEL_SERVICE (transport));
+		is_online = camel_session_get_online (session);
+		g_object_unref (session);
+
+		if (!is_online) {
+			g_set_error (
+				error, CAMEL_SERVICE_ERROR, CAMEL_SERVICE_ERROR_UNAVAILABLE,
+				_("Message send in offline mode is disabled"));
+			return FALSE;
+		}
+	}
+
 	if (camel_sendmail_settings_get_use_custom_binary (settings)) {
 		custom_binary = camel_sendmail_settings_dup_custom_binary (settings);
 		if (custom_binary && *custom_binary)
