SERVER EXPORTS

EmailMessage Structure
{
  "id": 1,
  "emailId": 101,
  "senderId": 5,
  "senderUsername": "police_department",
  "recipients": ["citizen1", "citizen2"],
  "topic": "Traffic Violation",
  "message": "You have been fined $500 for speeding.",
  "isRead": false,
  "isFavourite": false,
  "isInbox": true,
  "isInBin": false,
  "images": ["[https://example.com/evidence.jpg](https://example.com/evidence.jpg)"],
  "createdAt": 1678900000
}

Fetch Emails (By Source)

Fetches a list of emails for a player using their Server ID (Source). You can filter by inbox type (inbox, favourites, sent, bin).

local emails = exports["17mov_Phone"]:Email_FetchEmailsBySrc(src, inboxType)

Returns:

  • EmailMessage[]: An array of email objects.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

inboxType

"inbox" | "favourites"

| "sent" | "bin"

โŒ

Target inbox of player

Fetch Emails (By Number)

Fetches a list of emails for a player using their phone number. You can filter by inbox type. (inbox, favourites, sent, bin).

local emails = exports["17mov_Phone"]:Email_FetchEmailsByNumber(number, inboxType)

Returns:

  • EmailMessage[]: An array of email objects.

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

inboxType

"inbox" | "favourites"

| "sent" | "bin"

โŒ

Target inbox of player

Send System Email (By Source)

Sends an automated system email to a player using their Server ID (Source). This is useful for job notifications, alerts, or automated messages.

exports["17mov_Phone"]:Email_SendSystemEmailBySrc(src, topic, message, images)
Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

topic

string

โŒ

The subject line of the email.

message

string

โŒ

The main content of the email.

images

string[]

โœ…

An optional array of image URLs to attach.

Send System Email (By Number)

Sends an automated system email to a player using their phone number. This is useful for job notifications, alerts, or automated messages.

exports["17mov_Phone"]:Email_SendSystemEmailByNumber(number, topic, message, images)
Argument
Type
Optional
Explanation

src

number

โŒ

The player's phone number.

topic

string

โŒ

The subject line of the email.

message

string

โŒ

The main content of the email.

images

string[]

โœ…

An optional array of image URLs to attach.

Last updated