Back to index...

NameTypeDeprecatedSecureDescription
Command.Mail.DeletefunctionDeletes a mail.
Command.Mail.OpenfunctionOpens a mail, retrieving detailed information for it.
Command.Mail.PayfunctionPays the COD fee on a mail.
Command.Mail.ReturnfunctionReturns a mail to its sender.
Command.Mail.SendfunctionSends mail.
Command.Mail.SpamfunctionMarks mail as spam.
Command.Mail.TakefunctionTakes an attached item from mail.
Event.MailSignals a change in the available mail messages.
Inspect.Mail.DetailfunctionReturns information about mail.
Inspect.Mail.ListfunctionReturns a table of valid mail and its status.
Utility.Mail.CostfunctionReturns the amount of silver it will cost to send a given mail.

Command.Mail.Delete

Deletes a mail.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Delete(mail)
Command.Mail.Delete(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametermailThe ID of the mail to be targeted.

Command.Mail.Open

Opens a mail, retrieving detailed information for it.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Open(mail)
Command.Mail.Open(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametermailThe ID of the mail to be targeted.

Command.Mail.Pay

Pays the COD fee on a mail.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Pay(mail)
Command.Mail.Pay(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametermailThe ID of the mail to be targeted.

Command.Mail.Return

Returns a mail to its sender.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Return(mail)
Command.Mail.Return(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametermailThe ID of the mail to be targeted.

Command.Mail.Send

Sends mail.

Usage:

Interaction category: mail

Command.Mail.Send(mail)
Command.Mail.Send(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametertableTable containing data about the mail to send.
to: The name of the player to send mail to. Required.
subject: The mail's subject. Required.
body: The mail's body.
cod: The money required for the recipient to remove attachments. Mutually exclusive with "coin", requires non-empty "attachments".
coin: The amount of money attached to this message. Mutually exclusive with "cod".
attachments: A table listing the item IDs of the items you wish to attach. Maximum of 6.
hardwareevent
true

Command.Mail.Spam

Marks mail as spam.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Spam(mail)
Command.Mail.Spam(mail, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
mailparametermailThe ID of the mail to be targeted.

Command.Mail.Take

Takes an attached item from mail.

Usage:

Interaction category: mail

Throttled.

Command.Mail.Take(mail, item)
Command.Mail.Take(mail, items)
Command.Mail.Take(mail, item, callback)
Command.Mail.Take(mail, items, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
itemparameteritemThe ID of the item to be taken.
itemsparametertableA table containing a list of the items to be taken.
mailparametermailThe ID of the mail to be targeted.

Event.Mail

Signals a change in the available mail messages.

Usage:

Event.Mail(mail)
ParameterTypeDatatypeDescription
mailparametervariantThe changed mail messages. Takes the form of a table. The key is the mail ID, the value is "basic" to indicate basic information available about a piece of mail, "detail" to indicate detailed information available, or false to indicate no information available.

Inspect.Mail.Detail

Returns information about mail.

Usage:

Interaction category: mail

detail = Inspect.Mail.Detail(mail)
details = Inspect.Mail.Detail(mails)
ParameterTypeDatatypeDescription
mailparametermailThe identifier of the mail to retrieve detail for.
mailsparametertableA table of identifiers of mail to retrieve detail for.
detailresulttableDetail table for a single mail.
detailsresulttableDetail tables for all requested mail. The key is the mail ID, the value is the mail's detail table.
members
attachments The attachments available on this mail. A number if this mail has basic information, or a table of item IDs if this mail has detailed information.
body The body of this mail. Available only if detailed information on the mail has been retrieved.
cod The Cash on Delivery required to retrieve attachments out of this mail message.
expire The time this mail will expire, in Unix timestamp form.
from The name of the character this mail was sent from.
id The ID of the requested element.
read "true" if you have already opened this mail.
spam "true" if this mail is considered spam.
subject The subject line for this mail.

Inspect.Mail.List

Returns a table of valid mail and its status.

Usage:

Interaction category: mail

mails = Inspect.Mail.List()
ParameterTypeDatatypeDescription
mailsresulttableValid mail, in {id = "type"} format. The type may be either "basic" or "detail", indicating whether the mail has been opened and its detailed information is available.

Utility.Mail.Cost

Returns the amount of silver it will cost to send a given mail.

Usage:

cost = Utility.Mail.Cost(mail)
ParameterTypeDatatypeDescription
mailparametertableThe mail to check. In the same format as the parameter of Command.Mail.Send.
costresultnumberThe cost of sending this mail, in silver.

Back to index...