Issue (big for me...)

Aug 16, 2011 at 4:09 PM
Edited Aug 16, 2011 at 4:13 PM


I have a problem using your lib.

When I try to send an SMS, I receive this message "Object reference not set to an instance of an object" on the sendmessage.

This is the code:




SmppClient client = new SmppClient();


SmppConnectionProperties properties = client.Properties;

properties.SystemID =


properties.Password =


properties.Port = 30000;

properties.Host = "****";


client.AutoReconnectDelay = 3000;

client.KeepAliveInterval = 15000;






private void Button2_Click(object sender, EventArgs e)


 SmppClient client = new SmppClient();

 TextMessage msg = new TextMessage();


msg.DestinationAddress ="39****";


msg.SourceAddress ="39****"


msg.Text ="Prova";

msg.RegisterDeliveryNotification = true;


SmppClient client = GetSmppClient();





If I uncomment this

 //SmppClient client = GetSmppClient();

I receive this error:

The name 'GetSmppClient' does not exist in the current context

where is my mistake?


Thank you




private void Button1_Click(object sender, EventArgs e)

Aug 17, 2011 at 2:51 AM

Hi Drugo,

You seem to have general programming problem and I am sorry that this has nothing to do with Jamaa SMPP Client. Try to follow the flow of your application and make sure all objects are instantiated and configured properly.

Also, in your code I can see you are instantiating two different SmppClient classes. I am not sure why but this is definitely not what you should do.

Most of the tutorials available on Codeplex aim to give you a general understanding on how to use the library. Do not copy and pest the code snippets, but rather try to get the general knowledge so that you can write your own code. From the code snippet you posted above, it's clear to me that some lines are a copy and pest kind of work.


Jun 5, 2012 at 3:47 PM


I have been trying to use this SMPP client, it looks very easy to use I have implemented the client with no problem but I'm having the same error "Object reference not set to an instance of an object" when  I try to send the message exactly as the same example you have here. I think is not from my code because is telling the origin of the error is in the function sendmessage and I have done all following the examples of this website.

I know this thread was open and answered long time ago but I just would like to know if there is something new about this error.


Thank you for your time and sorry for the inconvenience.