[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mail4ME: Help! Problem with MailException class


I'm using Mail4ME (great class, guys) and I have a small block of code that
is designed to simply send a handshake (test) email to the server.

It compiles and preverifies fine, but when the app is launched in the
emulator I get this error:
ALERT: Unable to load class de/trantor/mail/MailException
Execution completed successfully
83891 bytecodes executed
8 thread switches
316 classes in the system (including system classes)
1374 dynamic objects allocated (88368 bytes)
15 garbage collections (73308 bytes collected)
Total heap size 500000 bytes (currently 452172 bytes free)

Here's my .JAD file:
MIDlet-Jar-Size:15613
MIDlet-1:PocketSDX,, PocketSDX.PocketSDX
MIDlet-Jar-URL:PocketSDX.jar
MicroEdition-Configuration:CLDC-1.0
MIDlet-Version:0.0.1
MIDlet-Vendor:MeyerS
MIDlet-Name:PocketSDX
MIDlet-Description:This midlet is ....
MIDlet-Data-Size:0
MicroEdition-Profile:MIDP-1.0
iDEN-Install-Class-2: de.trantor.mail.j2me.ConnectionImpl

Note: every time I rebuild the MIDlet (using Forte w/J2ME add-in from Sun)
it removes the "iDEN" line from the JAD.  Is there a way to stop it from
removing this line?

Anyway, here's the code I'm using in my MIDlet:
    private boolean sendHandshake() {
        // send a handshake to the server
        try {
            smClient = new SmtpClient("localhost");
            Message msg = new
Message("scott.meyer@sbt.siemens.com","scott.meyer@sbt.siemens.com","Handsha
ke");
            smClient.sendMessage(msg);
            smClient.close();
            return true;
        }    
        catch (MailException me) {
            System.out.println(me);
            me.printStackTrace();
        }
        catch (java.io.IOException ioe) {
            System.out.println(ioe);
            ioe.printStackTrace();
        }            

        return false;
    }

Any ideas?

Scott Meyer

Group Operations Supervisor
Direct #410-645-1522, Emergency Service #410-281-1212