Mail
Send in-game emails to the player.
Permission required: mail
Methods
send(options)
Send an email to the player's inbox.
typescript
Mail.send({
from: "[email protected]",
to: "[email protected]",
subject: "Important Update",
content: "Your mission has been updated.",
});Parameters:
| Name | Type | Description |
|---|---|---|
options.from | string | Sender email address |
options.to | string | Recipient email address |
options.subject | string | Email subject |
options.content | string | Email body |
options.attachment | object | Optional file attachment |
Attachments
typescript
Mail.send({
from: "[email protected]",
to: "[email protected]",
subject: "Files attached",
content: "See the attached document.",
attachment: {
name: "report",
extension: "txt",
content: "Confidential report contents...",
},
});TIP
For quest-related mail, use the Mails property on the Quest class instead. See the Quests guide.
