I had a go at this, and created what i'll describe as an 'alpha' version. Basically, you stick the jar i made, a javamail jar, and activation jar into classpath.
You need a properties file to tell it where the smtp host is, and settings for the spool. For examples of use have a look at SimpleTest.java. It implements a javamail Transport, so is used just as the normal smtp transport. It spools messages to disk when they are sent, and runs a background delivery thread that picks these up and sends them. A jar file containing classes and source, and the properties file is available at: http://www.netcase.co.uk/daniel/smtpspool/ Hope this is of some use to someone, Daniel. > -----Original Message----- > From: Serge Knystautas [mailto:[EMAIL PROTECTED] > Sent: 25 May 2004 15:43 > To: James Users List > Subject: Re: Integration into Tomcat > > > Daniel Perry wrote: > > Well, this seems like a more complicated, but equally more > useful approach. > > It's probably not more complicated as much as unfamiliar. > > > So, I figure, I implement a transport. > > > <snip> > > Sound about right? > > Yup. > > > Looking through the JavaMail docs, it seems the smtp settings > are included > > in the MimeMail via session in Message. Now I'm guessing that > session wont > > be stored if I use the writeTo method. So, the mail server > config used for > > sending the messages will be lost? > > True, you would need to store the envelope info somewhere (maybe just at > top of text message). As for other session information, perhaps just > stick with the same approach and store all session properties to the > text file as well. > > > Another question: When I send mail, I am assuming that I will > have to tell > > Session to use a different transport (going to mean messing with > > commons-sandbox-email because this is fixed to smtp). If I use the same > > session for sending mails, then I guess I will have to revert to smtp. > > Hmm, I think I understand how you're thinking of doing this. I would > probably just call the Sun SMTP impl directly, although by relaying on > the transport rules, you could create layers of transports. > > -- > Serge Knystautas > President > Lokitech >> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
