public class FileTransport
extends javax.mail.Transport
Transport
that appends messages to a file.Modifier and Type | Field and Description |
---|---|
static String |
APPEND |
static String |
FILE_PATH |
Constructor and Description |
---|
FileTransport(javax.mail.Session session,
javax.mail.URLName urlname)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(String host,
int port,
String user,
String password) |
protected boolean |
protocolConnect(String host,
int port,
String user,
String password) |
void |
sendMessage(javax.mail.Message message,
javax.mail.Address[] recipients) |
String |
toString() |
addTransportListener, notifyTransportListeners, removeTransportListener, send, send
public static final String FILE_PATH
public static final String APPEND
public FileTransport(javax.mail.Session session, javax.mail.URLName urlname)
session
- session to associate with this transporturlname
- url name to associate with this transportpublic void connect(String host, int port, String user, String password) throws javax.mail.MessagingException
connect
in class javax.mail.Service
javax.mail.MessagingException
protected boolean protocolConnect(String host, int port, String user, String password) throws javax.mail.MessagingException
protocolConnect
in class javax.mail.Service
javax.mail.MessagingException
public void sendMessage(javax.mail.Message message, javax.mail.Address[] recipients) throws javax.mail.MessagingException
sendMessage
in class javax.mail.Transport
javax.mail.MessagingException
public String toString()
toString
in class javax.mail.Service
Copyright © 2014–2018. All rights reserved.