Technical Reference: Mass SMS¶
Entity: SMS¶
The module uses (extends) the Sms entity. In the context of this module, the Sms entity serves as a campaign definition, not as a record of a single sent message.
Fields¶
| Name (System) | Type | Description |
|---|---|---|
name |
Varchar | Campaign/Message name. |
body |
Text | Content of the SMS message. |
targetLists |
LinkMultiple | Link to Target Lists. |
Sending Logic (Service)¶
Class: Espo\Modules\MassSms\Services\Sms
The method sendMassSms($smsId, $targetListsIds) performs:
- Loading the
Smsentity. - Iterating through Target List IDs.
- For each list, loading relations:
accounts,contacts,leads,users. - Extracting phone numbers (
phoneNumber). - Filtering:
- Removing duplicates (
array_unique). - Checking
phoneNumberIsInvalid. - Checking
phoneNumberIsOptedOut(GDPR). - Checking empty numbers.
- Removing duplicates (
- Calling
SmsSender->TMobileSender.
T-Mobile Integration¶
Class: Espo\Modules\MassSms\TMobile\TMobileSender
- Endpoint:
https://aweg.t-mobile.cz - Authentication: Basic Auth (user/password from
TMobileIntegration). - Method: GET request with parameters
auth,receiver,smstext. - Bulk ID: Generates a unique
bulkID for the message group during mass sending. - Number Normalization:
- Removes spaces and non-numeric characters.
- If starts with
00, keeps it (treats as international). - If starts with
+, keeps it. - Otherwise, adds prefix
+420.