API:DeleteInboxItem

__NOTOC__
DeleteInboxItem
Deletes an entry from you mail index.
DeleteInboxItem(index);
== Parameters ==
=== Arguments ===
:;index
::number - The index of the message to be deleted {1 .. GetInboxNumItems}.
=== Returns ===
:;nil
::void - The method does not return any values.
== Example ==
-- Delete all mails without any check:
local numMails = GetInboxNumItems();
for index = 1 , numMails do
 DeleteInboxItem(index);
end
== Notes ==
* Please note that the example above, is a very bad example on deleting all mails. Furthermore it may not work, as the server might stall since the delete requests are sent very frequently. 
* Events: When the deletion of the message is done, the event MAIL_INBOX_UPDATE should get raised. It may be a good idea to wait for this event before calling the DeleteInboxItem() again.
* The developer of Ultimate Mail Mod has figured out that deleting mail directly after taking the item from the message may fail, since the message is locked for deletion. Also issuing a lot of deletes after another may result in some deletions not being triggered. 
* Every developer knows the issues when deleting items in a loop by using the index. I'm not sure how long the index remains "stable". Maybe until we open the inbox again or maybe only until the delete is processed. Reviewing RoMail(2) shows strange coding to do mass deletion and Ultimate Mail Mod refreshes the local mail cache after each deletion.
== Related Functions ==
* GetInboxNumItems