Skip to content

Email to SMS

You can send SMS messages by email in two different ways: sending a single SMS to a specific phone number, or sending an SMS to a group of phone numbers.

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.eu

Sending to Multiple Phone Numbers (Group SMS)

Section titled “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.eu
OrderLabelDescription
1user_idUser Id (integer), identical to the login to LOX24
2api_key”Email2SMS” API key from the API Key settings page (“Settings” -> “API Settings”)
3phone/group_idFor single SMS, this is the phone number in E.164 format without leading ”+” (e.g. “491701234567”). For group SMS, this is the Group Id you can find in your web-account or request by API
4service_codeService code ‘text2speech’ or ‘direct’ (default)
5sender_idSender Id: an integer from 1 to 6 (default 1). Selection of the sender from the senders previously saved in the account (“Settings” -> “Sender-IDs”) If sender id wasn’t found, then the default value is ‘email2sms’.
6text_sourceText source: 0 - subject and body (by default), 1 - subject only, 2 - body only
7encodingAn integer: 0 - normal GSM (default), 1 - unicode, 2 - auto-detecting (by the whole text from request)
8max_sms_partsAn 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.

Send SMS to phones by a group id = 12345 (minimum parameters)

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345@email2bulk.lox24.eu

Send SMS to phones by a group id = 12345 with service ‘direct’

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct@email2bulk.lox24.eu

Send SMS to phones by a group id = 12345 with service ‘direct’ and with sender id = 2

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct.2@email2bulk.lox24.eu

Send 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.eu

Send 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.eu

Send SMS to a single phone number “+1234567890” (minimum parameters)

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890@mail2sms.lox24.eu

Send SMS to a single phone number “+1234567890” with service ‘direct’

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct@mail2sms.lox24.eu

Send SMS to a single phone number “+1234567890” with service ‘direct’ and sender id = 2

1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.1234567890.direct.2@mail2sms.lox24.eu

Send 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.eu

Send 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.eu

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

PropertyDescription
fieldError field in request
descriptionError description
requestEMail address to which the request was sent

{“field”:“group_id”,“description”:“Group with id = 12345 was not found!”,“request”:“1234567.e3f3a759b6677959b6ebfcxxxxxxxxxx.12345.direct@email2bulk.lox24.eu”}

Please note that the mail gateway does not work with email forwarding. The email must be sent directly to the Mail2SMS gateway mailbox.