ESODecoded

GetMailItemInfo

ESO Lua API function — used by 46 of the 3,030 addons we indexed (combined 11,883,645 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetMailItemInfo(id64 mailId)

Returns: string senderDisplayName, string senderCharacterName, string subject, textureName icon, bool unread, bool fromSystem, bool fromCustomerService, bool returned, integer numAttachments, integer attachedMoney, integer codAmount, integer:nilable expiresInDays, integer secsSinceReceived, category

Real usage — from Dolgubon's Lazy Writ Crafter

	while nextMail do
		local  _,_,subject, _,_,system,customer, _, numAtt, money = GetMailItemInfo (nextMail)
		if not customer and money == 0 and system and hirelingMailSubjects[subject] then

Short excerpt from the shipping addon Dolgubon's Lazy Writ Crafterits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
Dolgubon's Lazy Writ Crafter9,498,314
Info Panel368,274
ESO-Database.com Export AddOn272,910
CookeryWiz239,380
Merlin the Enchanter228,648
Wykkyd Mailbox162,721