https://github.com/sure-development/sure_headless-mailbox
Free Open Source, Headless Mailbox for everyone to customize your NUI
https://github.com/sure-development/sure_headless-mailbox
esx fivem lua mailbox
Last synced: 4 months ago
JSON representation
Free Open Source, Headless Mailbox for everyone to customize your NUI
- Host: GitHub
- URL: https://github.com/sure-development/sure_headless-mailbox
- Owner: Sure-Development
- Archived: true
- Created: 2025-08-26T09:29:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T14:05:46.000Z (6 months ago)
- Last Synced: 2025-09-14T08:15:01.714Z (5 months ago)
- Topics: esx, fivem, lua, mailbox
- Language: Lua
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sure_headless-mailbox
Free Open Source, Headless Mailbox for everyone to customize your NUI
**VERSION** `1.0.1`
**DISCORD** [OUR DISCORD](https://discord.gg/5CF2Z2JZWs)
## Core Features
- Mailbox with title, sender, sent_date, content, and items to receive
- Use JSON as storage
- Optimized net packet
## Example
```lua
--- Table key
['mail_entry_1'] = {
title = 'This is a title',
sender = 'Sure Headless',
sent_date = '8/26/2025',
content = [[
Content
- 1
- 2
- 3
- 4
]],
receives = {
{ type = 'item', name = 'painkiller', count = 1 },
{ type = 'account', name = 'money', count = 500 }
}
}
```
## Usage
### NUI
Reference type (typescript) from `./types/types.ts`
And you also need to add for visibility of NUI.
```typescript
window.addEventListener('message', (event: MessageEvent) => {
const type = event.data.type
if (type === 'update-mails') {
const mails = event.data.mails
...
} else if (type === 'add-mail-index-to-history') {
const index = event.data.index
...
} else if (type === 'update-history-indexes') {
const indexes = event.data.indexes
...
}
})
```
### Client Commands
#### Debug All Data
`sure_mb_debug`
#### Claim Items
`sure_mb_claim [index]`