javax.mail.event
Class TransportEvent
public class TransportEvent
This class models Transport events.
MESSAGE_DELIVERED
public static final int MESSAGE_DELIVERED
Message has been successfully delivered to all recipients by the
transport firing this event.
validSent[] contains all the addresses this transport sent to
successfully. validUnsent[] and invalid[] should be null.
- 1
MESSAGE_NOT_DELIVERED
public static final int MESSAGE_NOT_DELIVERED
Message was not sent for some reason.
validSent[] should be null. validUnsent[] may have addresses that
are valid(but the message wasn't sent to them).
invalid[] should likely contain invalid addresses.
- 2
MESSAGE_PARTIALLY_DELIVERED
public static final int MESSAGE_PARTIALLY_DELIVERED
Message was successfully sent to some recipients but not to all.
validSent[] holds addresses of recipients to whom the message was sent.
validUnsent[] holds valid addresses to which the message was not sent.
invalid[] holds invalid addresses, if any.
- 3
type
protected int type
The event type.
validSent
protected Address[] validSent
validUnsent
protected Address[] validUnsent
dispatch
public void dispatch(Object listener)
Invokes the appropriate TransportListener method.
- dispatch in interface MailEvent
getInvalidAddresses
public Address[] getInvalidAddresses()
Return the addresses to which this message could not be sent.
getMessage
public Message getMessage()
Get the Message object associated with this Transport Event.
getType
public int getType()
Return the type of this event.
getValidSentAddresses
public Address[] getValidSentAddresses()
Return the addresses to which this message was sent succesfully.
getValidUnsentAddresses
public Address[] getValidUnsentAddresses()
Return the addresses that are valid but to which this message was not
sent.