diff --git a/src/camel/camel-ews-store-summary.c b/src/camel/camel-ews-store-summary.c
index 83a8490..999162a 100644
--- a/src/camel/camel-ews-store-summary.c
+++ b/src/camel/camel-ews-store-summary.c
@@ -724,6 +724,9 @@ camel_ews_store_summary_get_folder_id_from_name (CamelEwsStoreSummary *ews_summa
 {
 	gchar *folder_id;
 
+	g_return_val_if_fail (ews_summary != NULL, NULL);
+	g_return_val_if_fail (folder_name != NULL, NULL);
+
 	S_LOCK (ews_summary);
 
 	folder_id = g_hash_table_lookup (ews_summary->priv->fname_id_hash, folder_name);
@@ -735,6 +738,41 @@ camel_ews_store_summary_get_folder_id_from_name (CamelEwsStoreSummary *ews_summa
 	return folder_id;
 }
 
+gchar *
+camel_ews_store_summary_get_folder_id_from_folder_type (CamelEwsStoreSummary *ews_summary,
+							guint64 folder_type)
+{
+	gchar *folder_id = NULL;
+	GSList *folders, *l;
+
+	g_return_val_if_fail (ews_summary != NULL, NULL);
+	g_return_val_if_fail ((folder_type & CAMEL_FOLDER_TYPE_MASK) != 0, NULL);
+
+	folder_type = folder_type & CAMEL_FOLDER_TYPE_MASK;
+
+	S_LOCK (ews_summary);
+
+	folders = camel_ews_store_summary_get_folders (ews_summary, NULL);
+
+	for (l = folders; l != NULL; l = g_slist_next (l)) {
+		gchar *id = l->data;
+		guint64 folder_flags;
+
+		folder_flags = camel_ews_store_summary_get_folder_flags (ews_summary, id, NULL);
+		if ((folder_flags & CAMEL_FOLDER_TYPE_MASK) == folder_type) {
+			folder_id = id;
+			l->data = NULL;
+			break;
+		}
+	}
+
+	g_slist_free_full (folders, g_free);
+
+	S_UNLOCK (ews_summary);
+
+	return folder_id;
+}
+
 gboolean
 camel_ews_store_summary_has_folder (CamelEwsStoreSummary *ews_summary,
                                     const gchar *folder_id)
diff --git a/src/camel/camel-ews-store-summary.h b/src/camel/camel-ews-store-summary.h
index b048b4b..3bbc1c8 100644
--- a/src/camel/camel-ews-store-summary.h
+++ b/src/camel/camel-ews-store-summary.h
@@ -151,6 +151,10 @@ gchar *		camel_ews_store_summary_get_folder_id_from_name
 						(CamelEwsStoreSummary *ews_summary,
 						 const gchar *folder_name);
 
+gchar *		camel_ews_store_summary_get_folder_id_from_folder_type
+						(CamelEwsStoreSummary *ews_summary,
+						 guint64 folder_type);
+
 gboolean	camel_ews_store_summary_has_folder
 						(CamelEwsStoreSummary *ews_summary,
 						 const gchar *id);
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 65bb9b2..0f5b10d 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -1021,7 +1021,26 @@ ews_get_trash_folder_sync (CamelStore *store,
                            GCancellable *cancellable,
                            GError **error)
 {
-	return NULL;
+	CamelEwsStore *ews_store;
+	CamelFolder *trash = NULL;
+	gchar *folder_id, *folder_name;
+
+	g_return_val_if_fail (CAMEL_IS_EWS_STORE (store), NULL);
+
+	ews_store = CAMEL_EWS_STORE (store);
+	folder_id = camel_ews_store_summary_get_folder_id_from_folder_type (ews_store->summary, CAMEL_FOLDER_TYPE_TRASH);
+
+	if (!folder_id)
+		return NULL;
+
+	folder_name = camel_ews_store_summary_get_folder_full_name (ews_store->summary, folder_id, NULL);
+
+	trash = ews_get_folder_sync (store, folder_name, 0, cancellable, error);
+
+	g_free (folder_name);
+	g_free (folder_id);
+
+	return trash;
 }
 
 static gboolean
