SendMail
Jump to navigation
Jump to search
This function is restricted.
|
Sends in-game mail.
SendMail(recipient, subject [, body])
Arguments
- recipient
- string - Intended recipient of the mail.
- subject
- string - Subject of the mail. Cannot be an empty string or
nil
, but may be whitespace, e.g." "
- body
- string? - Body of the mail.
Details
- Triggers MAIL_SEND_SUCCESS if mail was sent to the recipient's inbox, or MAIL_FAILED otherwise. Repeated calls to SendMail() are ignored until one of these events fire.
Example
Assuming a friendly player named Bob exists on your server:
SendMail("Bob", "Hey Bob", "Hows it going, Bob?")
Patch changes
Patch 9.1.5 (2021-11-02): Protected when called from a (macro) script.