Re: JavaMail in WO
Re: JavaMail in WO
- Subject: Re: JavaMail in WO
- From: Michael Engelhart <email@hidden>
- Date: Sat, 7 Feb 2004 07:34:33 -0500
You need to create a class that implements the
javax.mail.event.TransportListener and implement the
messageNotDelivered(TransportEvent e) method.
You can then loop through it something like this (warning: code not
tested):
public void messageNotDelivered(TransportEvent e) {
Address[] invalidAddresses = e.getInvalidAddresses();
if (invalidAddresses != null) {
for (int i = 0; i < invalidAddresses.length; i++) {
NSLog(invalidAddresses[i]);
}
}
There is also methods to getValidUnsentAddresses() and
getValidSentAddresses() which are pretty self explanatory. Take a
look at the javadoc and it explains it.
Mike
On Feb 6, 2004, at 9:39 PM, Jonathan Fleming wrote:
I'm using javaMail quite successfully but I don't know how to set it
up to return an unsent error message. Can anyone tell me how or help
me out with completing the code below to do this?
Eg. like this that hotmail does when an address is not valid or
reponding.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.