Lua SendMail

From ArcEmu-Wiki
Jump to: navigation, search
Main Page        LuaArcEmu Website     ArcEmu Forum     Bug Tracker

Ico maintenance.png Some of the content of this wikipage is not up to date and need some maintenance. Please help to improve this page and do some update.


SendMail(type, senderGuid, receivrGuid, subject, body, money, codAmount, itemRawGuid, stationeryId [, deliverdelay])


Sends immediately a mail, optional with money or items.


Possible values for type:

   NORMAL  = 0
   COD     = 1      (Cash on Delivery)
   AUCTION = 2

Possible values for stationeryID (mail style):

   MAIL_STATIONERY_TEST2		= 41             /That's the default mail. (I don'know why it's written TEST2)
   MAIL_STATIONERY_GM			= 61             /shows a Blizz icon and the title is Support
   MAIL_STATIONERY_AUCTION		= 62             /shows a item icon and a auction house mail background
   MAIL_STATIONERY_VALENTINES		= 64             /shows a Valentine card icon and a valentine mail background
   MAIL_STATIONERY_XMAS			= 65             /shows XMas mail background

deliverdelay: Time in seconds to wait with delivering the mail (Default: 0)


Sends a message FROM the character with ID 15 in the character database TO the actual player, telling him welcome and give some money.

local Sender = 15
SendMail(0, NumberToGUID(Sender), pPlayer:GetGUID(), "Hello", "Welcome", 10000, 0, 0, 41)  -- send 1 gold

SendMail(0, NumberToGUID(Sender), pPlayer:GetGUID(), "Hello", "Welcome", 10000, 0, NumberToGUID(4240), 41) -- send 1 gold and a woolen bag

See Git bug (closed but not fixed !):

Personal tools