Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
mNo edit summary
No edit summary
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{wowapi}} __NOTOC__
+
{{wowapi}}
 
 
Sends in-game mail.
 
{{Code/Begin}}
 
SendMail(recipient, subject, body)
 
{{Code/End}}
 
   
 
Sends in-game mail, if your mailbox is open.
 
SendMail("recipient", "subject", "body")
   
 
== Parameters ==
 
== Parameters ==
   
 
<big>'''Arguments'''</big>
 
<big>'''Arguments'''</big>
:(recipient, subject, body)
+
:("recipient", "subject", "body")
   
 
:;recipient: String - intended recipient of the mail
 
:;recipient: String - intended recipient of the mail
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:
 
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.

Revision as of 15:38, 13 September 2010

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

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

Parameters

Arguments

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


Triggers Events

  • "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

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.