I need to send an email with Nokia 6610 from a Jar app.I want to ask only smtp server,destination email and email text.How can i do ?

Thanks

? Can you download extra JAR's onto the phone ?

If so, Sun has an official email API (javax.mail.* and friends) which you can find and download from java.sun.com. The version I usually use is about 350k in two jar files which you just drop into the directory (or preferably into your JVM's EXT directory) - which is probably way too big for you?

With that API, your code ends up something like this (copied and pasted from a real project):

Sadly, with MIDP you can't just drop extra library JAR files into the phone. The platform (MIDP + optional APIs like JSR-120 SMS API) that the phone ships with is all you have: everything else must be included in the MIDlet's own JAR file.

The Nokia 6610 is a 'Series 40' phone, not a Symbian 'Series 60' phone. As such it has a MIDlet JAR file size restriction of 64KB, so Blah's Java Mail API JAR would be too big, even if it worked with the MIDP APIs (which it won't).

And the sample code that vrm posted is J2SE code, and uses J2SE's java.net API which is not available in MIDP. So that won't work either, sorry.

The Nokia 6610 supports MIDP 1.0, so the only networking protocol it supports is HTTP (client only). To write an e-mail MIDlet you'll have to connect over HTTP to a custom servlet (or CGI script, etc.), and write the custom servlet to use code like vrm's to access the real mail server.

MIDP 2.0 (supported in Nokia 5140, 6230, 6600, 6620, 7610, 7700, 9500) optionally supports socket networking, and these Nokia implementations include this option. It uses the CLDC 'Generic Connection Framework' rather than the J2SE java.net APIs, so the socket code for those phones will be slightly different to vrm's example J2SE code.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org