aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index e961d794f2..735f3777a9 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -243,28 +243,13 @@ real_fetch_mail (gpointer user_data)
uids = camel_folder_get_uids (sourcefolder, ex);
printf("got %d messages in source\n", uids->len);
for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *msg;
-
- msg = camel_folder_get_message (sourcefolder, uids->pdata[i], ex);
+ camel_folder_move_message_to (sourcefolder, uids->pdata[i], folder, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
- async_mail_exception_dialog ("Unable to read message", ex, fb);
- gtk_object_unref (GTK_OBJECT (msg));
+ async_mail_exception_dialog ("Unable to get new mail", ex, fb);
gtk_object_unref (GTK_OBJECT (sourcefolder));
goto cleanup;
}
-
- camel_folder_append_message (folder, msg, ex);
- if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
- async_mail_exception_dialog ("Unable to write message", ex, fb);
- gtk_object_unref (GTK_OBJECT (msg));
- gtk_object_unref (GTK_OBJECT (sourcefolder));
-
- goto cleanup;
- }
-
- camel_folder_delete_message (sourcefolder, uids->pdata[i], ex);
- gtk_object_unref (GTK_OBJECT (msg));
}
camel_folder_free_uids (sourcefolder, uids);
camel_folder_sync (sourcefolder, TRUE, ex);