+
+ /* Set outbox and sentbox */
+ priv = MODEST_TNY_SEND_QUEUE_GET_PRIVATE (self);
+ priv->outbox = modest_tny_account_get_special_folder (TNY_ACCOUNT(account),
+ TNY_FOLDER_TYPE_OUTBOX);
+ priv->sentbox = modest_tny_account_get_special_folder (TNY_ACCOUNT(account),
+ TNY_FOLDER_TYPE_SENT);
+
+ /* NOTE that this could happen if there was not enough disk
+ space when the account was created */
+ if (!priv->outbox || !priv->sentbox) {
+ g_object_unref (self);
+ return NULL;
+ }
+