• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: JavaMail in WO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >JavaMail in WO (From: "Jonathan Fleming" <email@hidden>)

  • Prev by Date: Re: Globally unique IDs
  • Next by Date: Re: Globally unique IDs
  • Previous by thread: JavaMail in WO
  • Next by thread: href path components
  • Index(es):
    • Date
    • Thread