javax.mail
Class Transport
public abstract class Transport
A message transport mechanism that can be used to deliver messages.
addConnectionListener , close , connect , connect , connect , connect , getURLName , isConnected , notifyConnectionListeners , protocolConnect , queueEvent , removeConnectionListener , setConnected , setURLName , toString |
Transport
public Transport(Session session,
URLName url)
Constructor.
session
- the session context for this transporturl
- a URLName to be used for this transport
addTransportListener
public void addTransportListener(TransportListener l)
Adds a listener for transport events.
notifyTransportListeners
protected void notifyTransportListeners(int type,
Address[] validSent,
Address[] validUnsent,
Address[] invalid,
Message msg)
Notifies all transport listeners.
removeTransportListener
public void removeTransportListener(TransportListener l)
Removes a transport event listener.
send
public static void send(Message msg)
throws MessagingException
Sends the specified message.
The message will be sent to all recipient addresses specified in the
message, using transports appropriate to each address (specified by the
javamail.address.map
resource).
msg
- the message to send
send
public static void send(Message msg,
Address[] addresses)
throws MessagingException
Sends the message to the specified addresses, ignoring any recipients
specified in the message itself.
msg
- the message to sendaddresses
- the addresses to which to send the message
sendMessage
public abstract void sendMessage(Message msg,
Address[] addresses)
throws MessagingException
Sends the message to the specified list of addresses.
msg
- the message to be sentaddresses
- the addresses to send this message to
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved