Documentation
  • 📄TeamsGG Documentation
    • Common Errors
  • Paid Scripts
    • 📱Phone
      • 🧠Installation
      • 🦄Unique phones
      • 💿Configure
        • 💄Additional Features
        • 📸Camera
        • 🍏Apps
        • 🪵Logs
        • 🖼️Media Customization
        • 🗣️Multi-Language Support
        • 🗃️SIM Cards
        • 🚗Valet System
      • ⏭️Exports
        • Client side
          • 👁️‍🗨️General
          • ☀️Groups
          • 🏢Companies
          • 🔧Misc
        • Server side
          • 🆔Identify Player
          • ☎️Sim Cards
          • ☀️Groups
          • 🌐Cell Broadcast
          • 💸YPay
          • 📧Mail
          • 📪Notifications
          • 📵Screen Damage
          • 🔧Misc
      • 🪛Commands
      • 🍎Custom apps
    • ☎️Boomer Phone
      • 🧠Installation
      • 🦄Unique phones
      • ⏯️Exports
        • Client side
    • 🏠Properties
      • 🧠Installation
      • 💿Configure
      • 🐚Add More Shells
      • ⏭️Exports
        • Client side
          • GetCurrentPropertyId
          • GetCurrentProperty
          • IsPointInsideProperty
          • OpenPropertyMenu
          • AddKey
          • RemoveKey
          • SetWaypointToProperty
          • GetAllProperties
          • GetKeyHolders
          • PoliceRaidDoor
        • Server side
          • GetAllProperties
          • AddKey
          • RemoveKey
          • ToggleDoorlock
          • GetPlayersInProperty
          • GetKeyHolders
          • DeleteProperty
          • AddStarterApartment
      • 👜State bags
    • 🏦Banking
      • 🧠Installation
      • ⏯️Exports
        • Client side
        • Server side
    • 💸Billing
      • 🧠Installation
      • ⏭️Exports
        • Client side
        • Server side
    • 📊Hud
      • 🧠Installation
      • ⏭️Exports
        • Client side
    • 📦Storage Units
      • 🧠Installation
Powered by GitBook
On this page
  • SendMail
  • DeleteMail
  1. Paid Scripts
  2. Phone
  3. Exports
  4. Server side

Mail

PreviousYPayNextNotifications

Last updated 3 days ago

Send Mail - Used to send a mail -

SendMail

-- 'source' or 'phoneNumber' or 'phoneImei' or 'all'
local receiverType = 'all'
-- phone number or phone imei or source id or empty if `receiverType` is 'all'
local receiver = '088-888-8888'
--local receiver = GetPlayerServerId(PlayerId()) // Use it to get the source id of the player if you're using it in a client script.

-- email - table
-- email.title - string, title(subject) of the email
-- email.sender - string, email of the sender
-- email.senderDisplayName - string, display name of the sender
-- email.content - string, content of the email
-- email.actions - table(optional), button actions to add to the email
-- email.attachments - table(optional), attachments to add to the email(photo, location)
-- toType: string, type of recipient, can be "phoneNumber" or "phoneImei" or "all"
-- to: string, recipient's phone number or imei or empty if `toType` is 'all' (optional)
local insertId, received = exports.yseries:SendMail({
    title = "Email title",
    sender = 'phone@yflip.com',
    senderDisplayName = 'YFlip Phone',
    content = 'Email content',
    actions = { -- actions are optional
        {
            label = "Accept",
            data = {
                event = "yseries:client:mail:test-callback",
                isServer = false,
                data = "test data",
                -- if *true: the email tab will be closed after the callback is executed, *false: keep the email details tab open
                shouldClose = true
            }
        },
        {
            label = "Decline",
            data = {
                event = "yseries:client:mail:test-callback",
                isServer = true,
                data = "test data",
                shouldClose = false
            }
        }
    },
    attachments = {
        { photo = "https://i.imgur.com/2QZQ5kL.png" },
        { location = { x = 10, y = 10 } }
    }
}, receiverType, receiver)

DeleteMail

---@param id string The id of the mail
---@return boolean
local success = exports.yseries:DeleteMail(id)
📱
⏭️
📧
Preview