Encoding 'SMSCDefault' does not support messages of length greater than '160' charactors

Feb 7, 2012 at 9:11 AM
Edited Feb 7, 2012 at 9:14 AM

Dear Ben and Codexer,

I am facing this error when I try to send a message of about 159 characters..

Encoding 'SMSCDefault' does not support messages of length greater than '160' charactors

Kindly advice if this exception message comes from the Jamaa SMPP Client or message received from the SMS Gateway?

 

Below is the code that I am using...

 

Many Thanks and Best Regards,

Jojo

 

try

{

  debuglog.Debug("START Sending SMS via client.SendMessage(msg)");

  //** Normal Sending **

 client_SendSMS.SendMessage(msg);

}

catch (Exception exc)

{

debuglog.Debug("THROWN Exception; SMS sending has failed.....; [Send SMS]");nment.NewLine);

debuglog.Debug("exc.Message: " + System.Environment.NewLine + exc.Message + System.Environment.NewLine);

}


Debug Log:

----------------------------------------

Message:7/2/2012 1:31:42 PM START Sending SMS via client.SendMessage(msg)

Message:7/2/2012 1:31:42 PM THROWN Exception; SMS sending has failed.....; [Send SMS]

Message:7/2/2012 1:31:42 PM exc.Message: Encoding 'SMSCDefault' does not support messages of length greater than '160' charactors

Feb 23, 2012 at 12:42 AM

some punctuation counts as multiple characters.