I am using inetlab.smpp
in c# web app to send sms. A client is created and connected successfully and bound but the message is not delivered to the recipient
public partial class sendsmss : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected async void send_Click(object sender, EventArgs e)
{
SmppClient client = new SmppClient();
await client.Connect("xx.xx.xx.xx", 00000);
if (client.Status == Inetlab.SMPP.Common.ConnectionStatus.Open)
{
await client.Bind("user", "pass");
if (client.Status == Inetlab.SMPP.Common.ConnectionStatus.Open)
{
SubmitSm sm = new SubmitSm();
sm.UserData.ShortMessage = client.EncodingMapper.GetMessageBytes("Test Test Test Test Test Test Test Test Test Test", DataCodings.Default);
sm.SourceAddress = new SmeAddress("1111");
sm.DestinationAddress = new SmeAddress("12345678");
sm.DataCoding = DataCodings.UCS2;
sm.RegisteredDelivery = 1;
await client.Submit(sm);
SubmitSmResp response = await client.Submit(sm);
if (response.MessageId != "")
{
Response.Write("response.messageID is " + response.MessageId.ToString() + "</br> ");
}
else { Response.Write("response null </br> "); }
await client.UnBind();
}
}
}
}
I expect the sms is delivered to recipient