public class FixedRecipientTransport
extends javax.mail.Transport
Transport
that delivers mail to a configurable envelope
recipient, ignoring any other envelope recipients. Delivery is delegated
to another Transport
.Modifier and Type | Field and Description |
---|---|
static String |
ADDRESS |
static String |
DELEGATE |
static String |
LOCATOR_CLASS |
static String |
PROTOCOL |
Constructor and Description |
---|
FixedRecipientTransport(javax.mail.Session session,
javax.mail.URLName urlname)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnectionListener(javax.mail.event.ConnectionListener l) |
void |
addTransportListener(javax.mail.event.TransportListener l) |
void |
close() |
void |
connect() |
void |
connect(String host,
int port,
String user,
String password) |
void |
connect(String user,
String password) |
void |
connect(String host,
String user,
String password) |
boolean |
isConnected() |
void |
removeConnectionListener(javax.mail.event.ConnectionListener l) |
void |
removeTransportListener(javax.mail.event.TransportListener l) |
void |
sendMessage(javax.mail.Message message,
javax.mail.Address[] addresses) |
public static final String PROTOCOL
public static final String DELEGATE
public static final String ADDRESS
public static final String LOCATOR_CLASS
public FixedRecipientTransport(javax.mail.Session session, javax.mail.URLName urlname)
session
- owning sessionurlname
- name for the transportpublic void connect() throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public void connect(String host, String user, String password) throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public void connect(String user, String password) throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public void connect(String host, int port, String user, String password) throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
public boolean isConnected()
isConnected
in class javax.mail.Service
public void close() throws javax.mail.MessagingException
close
in class javax.mail.Service
javax.mail.MessagingException
public void addConnectionListener(javax.mail.event.ConnectionListener l)
addConnectionListener
in class javax.mail.Service
public void removeConnectionListener(javax.mail.event.ConnectionListener l)
removeConnectionListener
in class javax.mail.Service
public void addTransportListener(javax.mail.event.TransportListener l)
addTransportListener
in class javax.mail.Transport
public void removeTransportListener(javax.mail.event.TransportListener l)
removeTransportListener
in class javax.mail.Transport
public void sendMessage(javax.mail.Message message, javax.mail.Address[] addresses) throws javax.mail.MessagingException
sendMessage
in class javax.mail.Transport
javax.mail.MessagingException
Copyright © 2014–2018. All rights reserved.