API:GetInboxNumItems

Returns the number of (accessable) mail items in your inbox.
GetInboxNumItems()
== Parameter ==
none
== Returns ==
:;numMails
::Integer - the number of messages in your inbox.
== Example ==
Delete all mails without any check:
local numMails = GetInboxNumItems();
for index = 1 , numMails do
 DeleteInboxItem(index);
end
Please note that this is a very bad example of deleting all mails. Furthermore it may not work, as the server might stall since the delete requests are sent very frequently. 
Category:API Mail Function