Email to SMS
Sending SMS via Email
Seção intitulada “Sending SMS via Email”You can send SMS messages via email in two different ways: sending a single SMS to a specific phone number, or sending an SMS to a group of phone numbers.
Sending a Single SMS
Seção intitulada “Sending a Single SMS”To send a single SMS, the email should be formatted as follows:
{{user_id}}.{{api_key}}.{{phone}}.{{service_code}}.{{sender_id}}.{{text_source}}.{{encoding}}.{{max_sms_parts}}@mail2sms.lox24.euSending to Multiple Phone Numbers (Group SMS)
Seção intitulada “Sending to Multiple Phone Numbers (Group SMS)”To send an SMS to phone numbers from a specific group, use the following format:
{{user_id}}.{{api_key}}.{{group_id}}.{{service_code}}.{{sender_id}}.{{text_source}}.{{encoding}}.{{max_sms_parts}}@email2bulk.lox24.euParameters:
Seção intitulada “Parameters:”| Order | Label | Description |
|---|---|---|
| 1 | user_id | User Id (integer) |
| 2 | api_key | ”Email2SMS” API key from the API Key settings page (“Settings” -> “API Settings”) |
| 3 | phone/group_id | For single SMS, this is the phone number in E.164 format without leading ”+”. For group SMS, this is the Group Id you can find in your web-account or request by API |
| 4 | service_code | Service code ‘text2speech’, ‘direct’ (default) |
| 5 | sender_id | Sender Id: an integer from 1 to 6 (default 1). If sender id wasn’t found, then the default value is ‘email2sms’. |
| 6 | text_source | Text source: 0 - subject + body (by default), 1 - subject, 2 - body |
| 7 | encoding | An integer: 0 - normal GSM (default), 1 - unicode, 2 - auto-detecting (by the whole text from request) |
| 8 | max_sms_parts | An integer between 1 and 10. Default value is 1. There’s a limit to the length of text when parsing the email. Extra characters are used for concatenation in messages longer than the standard limits. |
Email Addresses Examples
Seção intitulada “Email Addresses Examples”Group SMS Examples
Seção intitulada “Group SMS Examples”Send SMS to phones by a group id = 12345 (minimum parameters)
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345@email2bulk.lox24.euSend SMS to phones by a group id = 12345 with service ‘direct’
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct@email2bulk.lox24.euSend SMS to phones by a group id = 12345 with service ‘direct’ and with sender id = 2
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct.2@email2bulk.lox24.euSend SMS to phones by a group id = 12345 with service ‘direct’, with sender id = 2, and text from email’s subject
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct.2.1@email2bulk.lox24.euSend SMS to phones by a group id = 12345 with service ‘direct’, with sender id = 2, with text from email’s subject, and encoding auto-detection
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct.2.1.2@email2bulk.lox24.euSingle SMS Examples
Seção intitulada “Single SMS Examples”Send SMS to a single phone number “+1234567890” (minimum parameters)
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890@mail2sms.lox24.euSend SMS to a single phone number “+1234567890” with service ‘direct’
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct@mail2sms.lox24.euSend SMS to a single phone number “+1234567890” with service ‘direct’ and sender id = 2
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct.2@mail2sms.lox24.euSend SMS to a single phone number “+1234567890” with service ‘direct’, with sender id = 2, and text from email’s subject
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct.2.1@mail2sms.lox24.euSend SMS to a single phone number “+1234567890” with service ‘direct’, with sender id = 2, with text from email’s subject, and encoding auto-detection
1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct.2.1.2@mail2sms.lox24.euReplies about errors
Seção intitulada “Replies about errors”Most errors are ignored to reduce unwanted flooding, including authentication-related errors. But for some errors, the system sends a JSON response with an error description.
Error JSON
| Property | Description |
|---|---|
| field | Error field in request |
| description | Error description |
| request | EMail address to which the request was sent |
Example
Seção intitulada “Example”{“field”:“group_id”,“description”:“Group with id = 12345 was not found!”,“request”:“1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct@email2bulk.lox24.eu”}
Email Forwarding Warning
Seção intitulada “Email Forwarding Warning”Please note that the mail gateway does not work with email forwarding. The email must be sent directly to the Mail2SMS gateway mailbox.