WoW API < SendMail

Sends in-game mail, if your mailbox is open.

SendMail("recipient", "subject", "body")

Parameters[edit | edit source]


("recipient", "subject", "body")
String - intended recipient of the mail
String - subject of the mail
String - body of the mail

Triggers Events[edit | edit source]

  • "MAIL_SEND_SUCCESS", when the mail was successfully sent to the mailbox of the recipient
  • "MAIL_FAILED", when the mail was not successfully sent

Note: A second call to SendMail() will not work until a SEND_MAIL_SUCCESS or SEND_FAILED event occurs.

Example[edit | edit source]

Assuming a friendly player named Bob exists on your server:

SendMail("Bob", "Hey Bob", "Hows it going, Bob?")

Note: SendMail("Bob", "", "How it going, Bob?") will not work as the subject is blank. SendMail("Bob", " ") will.

Community content is available under CC-BY-SA unless otherwise noted.