aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index cd31fa067f..47f949ac10 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -133,6 +133,22 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex)
return folder;
}
+CamelFolder *
+mail_tool_get_trash (const gchar *url, CamelException *ex)
+{
+ CamelStore *store;
+ CamelFolder *trash;
+
+ store = camel_session_get_store (session, url, ex);
+ if (!store)
+ return NULL;
+
+ trash = camel_store_get_trash (store, ex);
+ camel_object_unref (CAMEL_OBJECT (store));
+
+ return trash;
+}
+
/* why is this function so stupidly complex when allthe work is done elsehwere? */
char *
mail_tool_do_movemail (const gchar *source_url, CamelException *ex)