That just means there wasn't any "to" parameter in the request. Nothing to do with e-mail or DataInputStream or any of those things, the user just didn't type anything into the "to" field.
Originally posted by Muhammed Salah:
it returns null
Originally posted by Paul Clapham:
the user just didn't type anything into the "to" field.
And it appears that the posted code with DataOutputStreams is trying to do something like submitting a form. It looks like it's generating a "to" parameter, but the comments indicate the value of that parameter is something which should be URL-encoded, but isn't. And who knows? Maybe that's the wrong place to put the parameter. It's hard to tell from that fragment of code.
Originally posted by Bear Bibeault:
A null indicates that the text field was not part of the submitted form to begin with.
Originally posted by Srikanth Nutigattu:
In your code, remove this line
from the midlet. I could retrieve the fields from the servlet after that...
[ December 28, 2008: Message edited by: Srikanth Nutigattu ][/QB]
Muhammed Salah wrote:I have solved my Problem by using java mail.
I would like to thank everyone here, who tried to help me.........
Thank you so much,
Bauke Scholtz wrote:He said that he solved it using JavaMail.
Here is its homepage: http://java.sun.com/products/javamail
Especially checkout the FAQ, it contains lot of information and code examples.
Bauke Scholtz wrote:As said, especially checkout the FAQ, it contains lot of information and code examples.
It is not that hard. Just create a Java class which does the mailing task independently and test it as a Java application using main(). Once you got that work, just import/use that class in your J2ME application.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton