wowpedia
Main Menu


Returns info for an item attached in the outgoing message.

name, itemID, texture, count, quality = GetSendMailItem(index)

Parameters

index
number - The index of the attachment to query, in the range of [1,ATTACHMENTS_MAX_SEND]

Returns

name
string - The localized name of the item
itemID
number - Numeric ID of the item.
texture
string - The icon texture for the item
count
number - The number of items in the stack
quality
number - The quality index of the item (0-6)

Example

The following code will loop over all the items currently attached to the send mail frame, and print information about them to the chat frame:

for i = 1, ATTACHMENTS_MAX_SEND do
   local name, itemID, texture, count, quality = GetSendMailItem(i)
   if name then
      -- Construct an inline texture sequence:
      print("You are sending", "\124T"..texture..":0\124t", name, "x", count)
   end
end

Details

Patch changes

Legion Patch 7.0.3 (2016-07-19): itemID return added between name and texture.

See also