Skip to content

mail

This table contains main data about all mails in the game.

Structure ​

FieldTypeAttributesKeyNullDefaultExtraComment
idintunsignedPRINO0Identifier
messageTypetinyintunsignedNO0
stationerytinyintsignedNO41
mailTemplateIdsmallintunsignedNO0
senderintunsignedNO0Character Global Unique Identifier
receiverintunsignedMULNO0Character Global Unique Identifier
subjectlongtextYESNULL
bodylongtextYESNULL
has_itemstinyintunsignedNO0
expire_timeintunsignedNO0
deliver_timeintunsignedNO0
moneyintunsignedNO0
codintunsignedNO0
checkedintunsignedNO0
 

Description of fields ​

id ​

This field contains the unique ID across all messages.  

messageType ​

enum MailMessageType

IDNameComment
0MAIL_NORMAL
2MAIL_AUCTIONsend by auction house
3MAIL_CREATUREsend by npc
4MAIL_GAMEOBJECTsend by object
5MAIL_CALENDARcalendar event notification

 

stationery ​

Defines the background texture of the mail.

enum MailStationery gathered from Stationery ID

IDNameComment
1MAIL_STATIONERY_TEST
41MAIL_STATIONERY_DEFAULT
61MAIL_STATIONERY_GM
62MAIL_STATIONERY_AUCTION
64MAIL_STATIONERY_VALValentine
65MAIL_STATIONERY_CHRChristmas
67MAIL_STATIONERY_ORPOrphan

 

mailTemplateId ​

MailTemplate ID if available.  

sender ​

Can be one of:

receiver ​

character guid of the receiving player.  

subject ​

The mail subject is stored here.  

body ​

The text contained in the mail.  

has_items ​

Flag if the mail can contain items.

expire_time ​

Unix timestamp storing when the mail will be returned to sender. (or deleted if already returned or sent by non-player)  

deliver_time ​

Unix timestamp when the mail will be received. Affected by worldserver.conf MailDeliveryDelay  

money ​

Amount of copper either as attached or 'Cash On Delivery'  

cod ​

Determines if money is an attachment or COD due.

  • 0: money attachment
  • 1: COD to be paid  

checked ​

enum MailCheckMask

ValueFlagNameComment
00x00MAIL_CHECK_MASK_NONE
10x01MAIL_CHECK_MASK_READ
20x02MAIL_CHECK_MASK_RETURNEDThis mail was returned. Do not allow returning mail back again.
40x04MAIL_CHECK_MASK_COPIEDThis mail was copied. Do not allow making a copy of items in mail.
80x08MAIL_CHECK_MASK_COD_PAYMENT
160x10MAIL_CHECK_MASK_HAS_BODYThis mail has body text.