Skip to content

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:

NameTypeDescription
options.fromstringSender email address
options.tostringRecipient email address
options.subjectstringEmail subject
options.contentstringEmail body
options.attachmentobjectOptional 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.

HotBunny Interactive Entertainment Inc.