ModestMailOperationState *state;
ModestMailOperationPrivate *priv;
- /* FIXME: this should be fixed properly
- *
- * in some cases, priv was NULL, so checking here to
- * make sure.
- */
g_return_val_if_fail (self, NULL);
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
g_return_val_if_fail (priv, NULL);
update_account_send_mail (UpdateAccountInfo *info)
{
TnyTransportAccount *transport_account = NULL;
+ ModestTnyAccountStore *account_store;
+
+ account_store = modest_runtime_get_account_store ();
+
+ /* We don't try to send messages while sending mails is blocked */
+ if (modest_tny_account_store_is_send_mail_blocked (account_store))
+ return;
/* Get the transport account */
transport_account = (TnyTransportAccount *)
- modest_tny_account_store_get_transport_account_for_open_connection (modest_runtime_get_account_store(),
+ modest_tny_account_store_get_transport_account_for_open_connection (account_store,
info->account_name);
if (transport_account) {
/* Add pending call */
info->pending_calls++;
- tny_folder_store_get_folders_async (folder, folders, NULL,
+ tny_folder_store_get_folders_async (folder, folders, NULL, FALSE,
recurse_folders_async_cb,
NULL, info);
g_object_unref (folders);
/* Get all folders and continue in the callback */
folders = tny_simple_list_new ();
tny_folder_store_get_folders_async (TNY_FOLDER_STORE (priv->account),
- folders, NULL,
+ folders, NULL, FALSE,
recurse_folders_async_cb,
NULL, info);
g_object_unref (folders);