# Submitting Messages Through SMPP

## Submission Types

Messages may be submitted with either submit\_sm or data\_sm, using either the short\_message or message\_payload fields. The message length may not exceed the byte limit for the network that the message is being sent to.

For example, it takes 140 bytes on GSM networks

* Local Mail SMPP does not support submit\_multi. If the same message has to be sent to multiple destinations, each message must be sent separately.
* Concatenated messages are supported by using the User Data Header (UDH), which is included in the message size byte limit

## Submit Responses

1. A positive response to a submit will contain an error code of zero and a non-null message reference.
2. A negative response will contain a localmail [vendor-specific error code](https://docs.localmail.io/messaging/smpp/smpp-error-codes).

## Character Sets, Class and Data Coding

1. Local Mail SMPP supports the following two types of data coding schemes:\
   • GSM 03.38 Encoding (default)\
   • Latin 1 (ISO-8859-1) encoding

The default character set is GSM 338. Although for data\_coding=1 the character set GSM 03.38 is supported, it is NOT RECOMMENDED, as it is known to cause problems with character encoding.

#### **Message Encoding**

Please set data\_coding = 3 for ISO-8859-1(if and only if told so explicitly) encoded messages and data\_coding=0 for GSM 03.38 encoded messages.

#### **Unicode Messages**

For Unicode messages you have to set data\_coding = 8 and the message is expected in UTF-16 Big Endean format.

## Originators and Destination

The default originator type is full International MSISDN. Alpha numeric or network short code\
originators can be sent by using the following **ton values** in **source\_addr\_ton** field.

• Alphabetic 5\
• National / Network Short Code 3\
• International MSISDN 1

Destination Address types are not supported. They can be set to any value but are always interpreted as follows

1. This requires all the destination numbers to be sent in an international format without the leading 00.

## Long Messages

Long Messages, as the name suggests, are messages whose length exceeds the normal length imposed on short messages (160 for text SMS and 70 for Unicode SMS).

## Concatenated Messages

In this method, the long message is sent in parts as multiple short messages which are then\
displayed as a single SMS on the mobile phone.

#### **Note:** The messages will be joined together on the mobile phone only if the mobile supports long messages; else each message part will be displayed as a separate message.

In this method the client sends the UDH (User Data Header) as part of the short\_message\
field. The UDH contains all the details required for the mobile join the parts and make the\
complete message at its end. In this method the client has to set the esm\_class field in the submit\_sm pdu to 0x43 (Store and Forward with UDHI)

## Message Payload

Local Mail SMPP can accept a message with a length up to 64K octets.&#x20;

In this method the client uses the optional message\_payload of the submit\_sm pdu.

To use this method the client should set the interface\_version to 0x34; without which this field will not be available for sending messages.

### Need More Help?

If you need any further Help During your Integration or questions related to technical know-how, you can reach out to our support team at **<support@localmail.io>**
