public class SmtpTransport
extends Transport
Constructor and Description |
---|
SmtpTransport(Session session,
URLName urlName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close connection.
|
protected boolean |
protocolConnect(java.lang.String host,
int port,
java.lang.String user,
java.lang.String password)
Connect for the protocol.
|
void |
sendMessage(Message msg,
Address[] addresses)
Sends a message to the specified recipients.
|
protected boolean protocolConnect(java.lang.String host, int port, java.lang.String user, java.lang.String password) throws MessagingException
MessagingException
public void sendMessage(Message msg, Address[] addresses) throws MessagingException
msg
- the message to sendaddresses
- the destination addressesMessagingException
public void close() throws MessagingException
MessagingException