07-06-2012 09:00 AM
That's a complicated subject for such a general question.
You first need a reference to the inbound mail store.
See ServiceBook, ServiceConfiguration, Session, and Store.
Once you have a reference to the email store, you'll need a reference to the specific message to remove. See Message in the javadocs.
Do some research and come back with more specific questions.