ESME_RINVDSTADR Error Code on SendMessage

Jul 8, 2012 at 5:54 PM
Edited Jul 8, 2012 at 5:54 PM

So I used the code on the homepage to connect OK.   ie client.ConnectionState == SmppConnectionState.Connected.

 

When I try and sens a message using this code:

 

 

TextMessage msg = new TextMessage();

msg.DestinationAddress = textNumber.Text;
msg.DestinationAddress = "27" + msg.DestinationAddress.TrimStart(new[] { '0' });
msg.SourceAddress = "+2783000001"; 
msg.Text = textSMSText.Text;
msg.RegisterDeliveryNotification = true; 

try
{
    client.SendMessage(msg, 100000);
}
catch (SmppException exp)
{
    MessageBox.Show("Error Code " + exp.ErrorCode, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

 

I get an error ESME_RINVDSTADR which according to the source code is 'Invalid destination address'  I've even tried prepending the country code.  Any ideas?