The following sample code shows how you can delete all messages in current user's outbox using the API.
[C#]
using CMS.Messaging; using CMS.CMSHelper; using CMS.SiteProvider; using CMS.GlobalHelper;
...
// Deletes all messages in CurrentUser's outbox MessageInfoProvider.DeleteSentMessages(CMSContext.CurrentUser.UserID); |
Page url: http://devnet.kentico.com/docs/devguide/index.html?deleting_all_messages.htm