JavaMail and WebObjects 5
To get JavaMail working with WebObjects 5 (either as a replacement for WOMailDelivery or as a fun, stand on it's own type of mail thing), you need to grab the JavaMail packages from Sun's site, as well as the Java Activation Framework stuff.
Activation.jar
The JavaMail 1.2 Packages
Just dump those in your CLASSPATH somewhere and you should be off and running (Mac OS X and on you can drop them in /Library/Java/Home/lib/ext and everything's pretty happy.)
Of course, it also helps to have WebObjects 5. (If you've an Apple Developer Account, even the free one, you can log on to http://connect.apple.com and grab a trial version of WebObjects 5 from the software downloads section.)
I highly recommend writing a framework of wrapper classes for quite a few of the JavaMail classes, so you get back NSArrays instead of primitive arrays, but I've also heard of people who are wildly happy using the JavaMail classes straight.
This would, of course, be an excellent place for Java to have categories, but there you have it, no categories, so you wind up with large wrapper classes.
From personal experience, if you're going to go the wrapper route, I recommend wrapping javax.mail.Message, javax.mail.Folder, javax.mail.Session, and javax.mail.Store. This is the sort of bare minimum you'd really want to get up and working, if not quite as pure as you might hoped. But hey, quick and dirty is all right, isn't it? Of *course* it is.
Now, if you're not entirely familiar with JavaMail, a few good places to start are:
JavaMail API docs
Sun's List of JavaMail Resources
A combo jGuru-Sun course on the JavaMail API
Basically, if you want to emulate WOMailDelivery functionality with the ability to do attachments, what you'll want to do (or what *I've* done, and I realise the two aren't always in sync) is create a new javax.mail.Session, set it up with the appropriate iVars/properties, and then play with your mail. The advantage of the wrapper classes is that you can write a handy series of methods against your wrapped javax.mail.Session that mimic -WOMailDelivery.composePlainTextEmail(sender, dest, ccAddresses, subj, body, flag) and friends to include an attachments version.
software@supertart.com - QI Software.