m
Move page script moved page API SendMail to WoW:API SendMail without leaving a redirect
(Added a bit more detail.) |
m (Move page script moved page API SendMail to WoW:API SendMail without leaving a redirect) |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Sends in-game mail, if your mailbox is open. | Sends in-game mail, if your mailbox is open. | ||
SendMail("recipient", "subject", "body") | |||
SendMail("recipient", "subject", "body") | |||
== Parameters == | == Parameters == | ||
| Line 21: | Line 17: | ||
:* "[[Events/Mail#MAIL_SEND_SUCCESS|MAIL_SEND_SUCCESS]]", when the mail was successfully sent to the mailbox of the recipient | :* "[[Events/Mail#MAIL_SEND_SUCCESS|MAIL_SEND_SUCCESS]]", when the mail was successfully sent to the mailbox of the recipient | ||
:* "[[Events/Mail#MAIL_FAILED|MAIL_FAILED]]", when the mail was not successfully sent | :* "[[Events/Mail#MAIL_FAILED|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 == | == Example == | ||
Assuming a friendly player named Bob exists on your server: | Assuming a friendly player named Bob exists on your server: | ||
SendMail("Bob", "Hey Bob", "Hows it going, Bob?") | 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. | |||