The Mails events and quests from the old version of Smartphone or qb-phone are completely compatible with the Smartphone PRO system, it will read the events without the need to rename them.
With Smartphone PRO we can send Mails on the client and server side now!
Quasar Smartphone PRO has an even more advanced Mail system than its previous version. In this application we must register and we will have a real account, where we can send Mails, media files and more epic functions that we could not do before.
Can I send Mails to other players with a PRO Smartphone?
Of course, if that weren't the case, Smartphone PRO wouldn't really be PRO!
Can I use the old qs-smartphone events?
Yes, the PRO version will detect all the events of its previous version.
Can I use the native qb-phone events or do I need to edit all of them?
You don't have to edit anything, Smartphone PRO will adapt the qb-phone Mails to the Smartphone PRO version and they will work automatically.
What happens if I receive an email and I am not registered in the app?
A message will arrive notifying you that you received an Email but you could not receive it.
Can I integrate media files such as photos or videos from the export?
No, such a thing is not possible yet, within the game you can attach as many media files as you want.
Mail integration into other assets
In Smartphone PRO if it is possible to integrate Mails from the client and server side, read the steps carefully to understand the internal logic and not fail in the process.
The Mails system has integration of both the client and the server. Expand the tab according to your needs.
Client side integration
-- Example of how to use the sendNewMail event.RegisterCommand('mailTest', function(source)TriggerServerEvent('phone:sendNewMail', { sender ='Movistar Plus', subject ='Family telephone balance promotion', message ='Enjoy the family balance at only $8.50 per month, what are you waiting for?' })end, false)
Server side integration
-- Example of how to use the sendNewMail export.RegisterCommand('mailTest', function(source) exports['qs-smartphone-pro']:sendNewMail(source, { sender ='Quasar', subject ='Es tu culpa', message ='Es tu culpa que no haya un ejemplo de como usar esto...' })end, false)
Quest integration in Mail
The Quest system must have an event assigned to give it the function to accept such Mail.
The Mails system includes a completely optional option to integrate a button that responds with a specific event, which will operate through the next button value. Expand the tab according to your needs.
Client side integration
-- Example of how to use the sendNewMail event and Quest button!RegisterCommand('mailTest', function(source)TriggerServerEvent('phone:sendNewMail', { sender ='Movistar Plus', subject ='Family telephone balance promotion', message ='Enjoy the family balance at only $8.50 per month, what are you waiting for?'-- Execution example for the button button = { enabled =true, buttonEvent ='phone:client:movistarEvent', } })end, false)
Server side integration
-- Example of how to use the sendNewMail event and Quest button!RegisterCommand('mailTestSv', function(source) exports['qs-smartphone-pro']:sendNewMail(source, { sender ='Quasar', subject ='Es tu culpa', message ='Es tu culpa que no haya un ejemplo de como usar esto...',-- Execution example for the button button = { enabled =true, buttonEvent ='phone:client:movistarEvent', } })end, false)
Find out if a user is registered in Mail app
This export is server-side only.
This export will check with a boolean whether or not you are logged into the Mail app.
-- source: Player sourceexports['qs-smartphone-pro']:hasEmailAccount(source)
Administrative Mail Command (ads)
This command can be sent using quotes to be able to send long texts.
The Mail system does not end here, we also have a brief command to give community announcements, this command will send an Mail to the entire server giving it a general message.
The way the command is used can be done with quotes to send long texts. The command is very simple, we can use it in the following way /sendmail subject message.
/sendmail"Important" "Players please disconnect from the server for brief maintenance."