Mailboxes Management
Available since version 6.1.0-Warcraft
Introduction
Until now, Onesait Platform had a series of APIs available for sending emails using the mailbox provided by the Platform itself. As of version 6.1.0-Warcraft, a new mailbox manager has been added to the Control Panel, so that each user can create their own mailboxes.
This new concept is equipped with the same security as any other element of the Platform, and can be a public or private resource, and can also be shared within an Application so that it can be used by all users of the same.
How does it work?
To access the new Mailboxes manager, you will have to navigate to the Development Tools > Mailboxes Management menu.
Accessing, the list of mailboxes available to the user, both own and shared, will be displayed:
As with the other Control Panel modules, you will have the option to create a new Mailbox by clicking on the ‘+’ button at the top right of the screen:
This will launch the creation wizard to create a new Mailbox.
Filling in the general information
First of all, the following general information must be entered:
Identification: The unique name with which to identify the Mailbox.
Public: If you want the Mailbox to be public, or if you want it to be private.
Description: extended descriptive text of the Mailbox, such as its use, properties, characteristics, etc.
Configuration of the mailbox
Next you will have to add the information referring to the mail server to be used:
Host: the mail hosting server.
Port: the port number of the mail hosting server.
Email: the email address to use.
Timeout (ms): the maximum time in milliseconds that the SMTP server will wait for a response during communication with the mail server.
Connection timeout (ms): The time in milliseconds allowed to establish a connection to the SMTP server.
Write timeout (ms): the time in milliseconds allowed to write data to the SMTP server, including both mail body and attachments.
Authentication: whether it is necessary to identify with a username and password to access the mail server.
User: this option appears if the authentication box is checked, and refers to the login user of the mail server.
Password: this option appears if the authentication box is ticked, and refers to the password of the mail server login user.
Start TTLS enabled: if the TTLS of the mail server is enabled.
Once this information has been added, the new mailbox can be created by clicking on the ‘Create’ button:
Using the mailbox
Once the mailbox has been created, to start using it, you only need to use the APIs provided by Control Panel for sending emails.
To access these APIs, navigate to the Options > APIs context menu:
From the different options in the APIs section, select the ‘Control Panel’ option:
The Onesait Platform Swagger user interface will be displayed. In the top right-hand corner, choose the ‘Mail’ definition:
Once this is done, the mail management API calls will appear:
All the APIs have the default field defined as ‘true’, which indicates that the default mailbox configured by the administrator in the Centralised Platform Configuration will be used, which is the mailbox that has been used until now.
In the case of setting the field to ‘false’, it will be necessary to indicate the identifier of the mailbox to be used, taking into account that the user making the request must have permissions over the mailbox.