duh... attachment seemed to get lost....
BackgroundSender.java follows:
/*
* Created on 19-May-2004
*
*/
package org.apache.commons.mail;
import javax.mail.MessagingException;
/**
* A class to send messages in the background. Compose the mail as normal,
then
* use the static method: BackgroundSender.send(Email mail) to send the
email.
*
* @author Daniel Perry
*/
public class BackgroundSender extends Thread {
Email theMail;
/**
* Constructor takes an Email object, and sends it from a background
thread.
*/
private BackgroundSender(Email mail) {
super();
this.theMail = mail;
}
/**
* Static method to send a org.apache.commons.mail.Email message in the
* background. Note that if the message fails to get sent there is NO
* notification!
*
* @param mail
*/
public static void send(Email mail) {
new BackgroundSender(mail).start();
}
/**
* The run method of the thread that actually sends the mail.
*/
public void run() {
try {
theMail.send();
} catch (MessagingException ex) {
// do nothing here as this is running in a background thread,
and
// noone will do anything about it.
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]