- * because this function requires it to have a UID. */
- tny_folder_remove_msg (src_folder, header, NULL);
-
- tny_folder_sync (folder, TRUE, &err); /* FALSE --> don't expunge */
-/* tny_folder_sync_async (src_folder, TRUE, NULL, NULL, NULL); /\* expunge *\/ */
+ * because this function requires it to have a UID. */
+ tmp_headers = tny_simple_list_new ();
+ tny_list_append (tmp_headers, (GObject*) header);
+ tny_folder_remove_msgs_async (src_folder, tmp_headers, NULL, NULL, NULL);
+ g_object_unref (tmp_headers);
+ tny_folder_sync_async (src_folder, TRUE, NULL, NULL, NULL); /* expunge */