X3D Mailbox

Description

An offline mailbox with attachments — free, no database required

A player is offline but still owed an event prize, a compensation item, or a note from an admin — x3d_mailbox lets you send a mail with attachments and let them claim it whenever they log back in, through a ready-made Nuxt 4 panel. Works with any framework through editable adapter files.


Features

  • [+] Easy setup: tune everything in config, or set it through the web builder
  • [+] Send mail with attachments to offline players, or to everyone
  • [+] Several items plus cash, black money or bank in a single mail
  • [+] Mail expiry with a red countdown warning and a default lifetime
  • [+] Separate Mail and Safe tabs, each with its own unread count
  • [+] /redeem codes with use caps, one per player and an expiry time
  • [+] A full bag never loses the reward: it waits in the mail
  • [+] Claim all in one click, with double-claim and spam protection
  • [+] Unread mail count shown when a player joins
  • [+] JSON file storage with no database, or switch to MySQL
  • [+] Easy move from other mailboxes: SendMail accepts their format
  • [+] Hook into other scripts through addons/

Attach items and money together

SendMail/SendMailAll can attach several items and several money accounts (money, bank, black_money, or your framework's own) in a single mail. Set an expiry, set a custom sender name.

Moving from another mailbox? SendMail also accepts the format other mailboxes use (subject, cash/bank, items = {{ name, count }}, expiresInDays), so switching is just a rename of the export.

Works with any framework

Four files under addons/ — framework, notify, reward, storage — default to working with ESX out of the box, and fall back to standalone (ace only) with no framework installed. QBCore / ox_lib examples are commented in, ready to swap in.

No database required

Data is stored as a JSON file inside the resource itself, loaded once and flushed every 30 seconds, on player drop, and on a graceful stop or restart. A hard crash mid-session doesn't lose attachments — the real risk runs the other way: a mail claimed inside that last unflushed window (≤30 seconds) has already paid out through the framework, but the on-disk claimed flag never caught up, so a restart can let the same mail be opened and paid out again. Need MySQL for a busier server? Set Config.Storage.Driver = 'oxmysql' and mail is kept in the x3d_mailbox table, created automatically (no @oxmysql include needed).

Can't be claimed twice, a broken reward can't lock a player out

The claimed flag is written to storage before anything is paid out, so a duplicate claim event can never pay twice. If a misspelled item key makes the reward throw, the mail still gets marked claimed instead of leaving the player stuck retrying forever. Attachment counts are always floored to whole numbers, and the mail cap never deletes a mail that hasn't been claimed yet.

Built-in redeem codes

Hand out welcome, event or compensation codes without another script. A player types /redeem <code> or enters it in the mailbox panel, and the reward, items and money alike, is delivered as mail, so a full bag never loses it. You can deliver into the Safe tab instead.

  • Permanent codes in Config.Codes: a server-wide use cap (maxUses), one per player (oncePerPlayer) and an expiry time (expires)
  • Runtime codes from other scripts through exports (AddCode, RemoveCode, GetCodeUsage), for stream or event codes
  • Code usage survives restarts, and /redeem shares the claim throttle and lock, so spamming it still pays out once

Requirements

None. No database, no framework, no license. Drop it in and ensure it.

Free · modify it as you like · just don't resell it or re-upload it under another name.

Version history

  • 1.7.2 — Released 13/10/2026 00:22
  • 1.7.0 — Released 12/10/2026 10:25
  • 1.4.0 — Released 20/09/2026 17:38
  • 1.0.0 — Released 20/09/2026 02:05
Same category

Related scripts

View all products
Read more

Posts that cover this script