title: Not receiving SMS sent from SMS-Gateway in Java?
body: <p>FreeSMS issue again !</p>
  
  <p>I am using <a href="http://www.freesmsgateway.com/api" rel="nofollow">http://www.freesmsgateway.com/api</a> to send SMS on mobile through Java.</p>
  
  <p>I have registered on the given portal, I got the api-key. Using this api-key, when I run the Java code I get the following response - </p>
  
  <pre><code>&lt;div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"&gt;
  
  &lt;h4&gt;A PHP Error was encountered&lt;/h4&gt;
  
  &lt;p&gt;Severity: Notice&lt;/p&gt;
  &lt;p&gt;Message:  Trying to get property of non-object&lt;/p&gt;
  &lt;p&gt;Filename: controllers/api_send.php&lt;/p&gt;
  &lt;p&gt;Line Number: 127&lt;/p&gt;
  
  &lt;/div&gt;Message sent
  </code></pre>
  
  <p>But I am not receiving any SMS on mobile. Also I have tried to send SMS from their website but didn't received any SMS.</p>
  
  <p>My Java Code - </p>
  
  <pre><code>HttpPost post = new HttpPost("http://www.FreeSMSGateway.com/api_send");
  String access_token = "XXXXXXXXXXXXXXXXXXXXXXXXXX";
  String message = "Hello, this is demo message from SMS gateway";
  String send_to = "post_contacts";
  JSONArray jPostContact = new JSONArray();
  jPostContact.put("+91XXXXXXXXXX");
  List&lt;NameValuePair&gt; urlParameters = new ArrayList&lt;NameValuePair&gt;();
  urlParameters.add(new BasicNameValuePair("access_token", access_token));
  urlParameters.add(new BasicNameValuePair("message", message));
  urlParameters.add(new BasicNameValuePair("send_to", send_to));
  urlParameters.add(new BasicNameValuePair("post_contacts", jPostContact.toString()));
  post.setEntity(new UrlEncodedFormEntity(urlParameters));
  HttpResponse httpResponse = client.execute(post);
  </code></pre>
  
  <p>Please help me to resolve this issue. Thanks</p>