API:GetInboxHeaderInfo

__NOTOC__
GetInboxHeaderInfo
Retrieve information about a mail item in the inbox.
local packageIcon, sender, subject, COD, moneyMode, money, 
 daysLeft, paperStyle, items, wasRead, wasReturned, canReply = GetInboxHeaderInfo(index)
== Parameters ==
=== Arguments ===
:;index
::number - The index of the mail item {1 to GetInboxNumItems}.
== Returns ==
:;packageIcon
::string - Path to icon to be shown for this inbox entry.
:;sender
::string - Usually a character name that has send the item, or system for auctions.
:;subject
::string - The subject / topic of the mail item.
:;CODamount
::number - Charge on delivery amount - the money to be paid if the attached item will be taken.
:;moneyMode
::??? - diamonds or gold.
:;money
::number - The amount of money attached.
:;daysLeft
::float - The number of days the message will remain in the inbox. Unread mail items usually remain 30 days in the inbox. After reading a message the remaining time will be reduced to a maximum of 3 days. Messages with COD only remain 12 hours!
:;paperStyle
::???
:;items
::number- The number of attached items. Currently propper values should be 0 or 1. Multiple attachements are not yet seen in RoM.
:;wasRead
::Boolean - true if the message was read. This happens when calling the mail function GetInboxText.
:;wasReturned
::Boolean - true if the attachments were returned to the sender (by calling function ReturnInboxItem).
:;canReply
::Boolean - true if the message can be returned with ReturnInboxItem.
== Example ==
-- Retrieve the header information and for attached gold, diamons or items:
local packageIcon, sender, subject, COD, moneyMode, money, 
 daysLeft, paperStyle, items, wasRead, wasReturned, canReply = GetInboxHeaderInfo(index)
if (money ~= nil and money>0) or 
 (items ~= nil and items>0) then
 TakeIndoxItem(index);
end
== Notes ==
* You cannot retrieve an itemlink for items attached to mails. Thus if you like to show or read the tooltip for a mail item you need to use the widget function GameTooltip:SetInboxItem(index).
== Related Functions ==
* ReturnInboxItem
* GetInboxText
* GetInboxNumItems