+
+ account = modest_tny_account_store_get_tny_account_by_account (modest_runtime_get_account_store(),
+ rf_helper->account_name,
+ TNY_ACCOUNT_TYPE_STORE);
+ if (!account) {
+ g_printerr ("modest: failed to get tnyaccount for '%s'\n", rf_helper->account_name);
+ goto cleanup;
+ }
+
+ folder = modest_tny_account_get_special_folder (account, TNY_FOLDER_TYPE_DRAFTS);
+ if (!folder) {
+ g_printerr ("modest: failed to find Drafts folder\n");
+ goto cleanup;
+ }
+
+ tny_folder_add_msg (folder, msg, &err);
+ if (err) {
+ g_printerr ("modest: error adding msg to Drafts folder: %s",
+ err->message);
+ g_error_free (err);
+ goto cleanup;
+ }
+