How to connect to a smtp server
Is there any way to connect to a smtp server? I'm using the following code and receiving the following error:
connection = ( StreamConnection ) Connector.open( "socket://" + host + ":" + port );
error:
javax.microedition.io.ConnectionNotFoundException: The requested protocol does not exist socket://smtp_ip:25
Thanks in advance.
[368 byte] By [
nsrussell] at [2007-9-26 8:18:27]

[nsrussell],
Under the MIDP profile specification, it is mandatory for all kVM implementations to support the HTTP protocol i.e. it is mandatory to provide the support for the HttpConnection interface in the javax.microedition.io package. Support for the other connection protocols are optional, which means that this will depend on the person/organisation who provided the KVM implementation.
Looking at the exception that you received, looks like the kVM that you have used to run the code does not support the StreamConnection interface.
HTH.
Allen Lai
Developer Technical Support
SUN Microsystems
http://www.sun.com/developers/support/
> Hi Allen,> I thought MIDP 1.0 supports the simple socket> cket connection? MIDP 1 only supports HTTP. Socket is optional. Not all phones support it, and not many support it well.
mlk at 2007-7-1 18:50:13 >
