An open API service indexing awesome lists of open source software.

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

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]`