How in-game mail works: normal letters, COD, auction refunds and system mails
(src/game/Mail/Mail.cpp).
| Table (characters DB) | Purpose |
|---|---|
mail |
One row per message: sender/receiver guids, subject/body (item_text_id), money, expiry, checked flags. |
mail_items |
Items attached to a message (separate table for performance). |
item_instance |
The physical items themselves. |
System-generated mails (auction results, event rewards via
game_event_mail, item text copies) use sender = 0 or special
message types.
- Send - player mail with items/money or COD charge; rows created in
mail+mail_items. - Delivery - mails with items or money are delayed by
MailDeliveryDelay(default 1 hour); plain messages arrive instantly. Auction house mails are generated by the AH system. - Read/Return -
checkedbitmask tracks read/copied/returned state. - Expiry - expired mails are returned to the sender (once) then deleted by the periodic mail expiry task.
COD payments and auction cuts interact with characters.money (see Characters Database);
spam limits are configurable via the MailSpam.* settings
(mangosd.conf).
mail_loot_template can roll items directly into mails for
special reward flows.