Class com.tdac.mail.MailConnection
All Packages Class Hierarchy This Package Previous Next Index
Class com.tdac.mail.MailConnection
java.lang.Object
|
+----com.tdac.mail.SocketConnection
|
+----com.tdac.mail.MailConnection
- public class MailConnection
- extends SocketConnection
- implements MailBoxInterface
This base class defines a mail connection to a mail server using Sockets.
- Version:
- 1.0, 11/11/96
- Author:
- Timothy D. A. Cox
-
MailConnection()
-
-
closeBox()
- Close a mail box folder, expunging deleted messages
-
connect(String)
- Connect to a server.
-
connect(String, int)
- Connect to a server on a port.
-
deleteMessage(int)
- Delete a specific message
-
getFolders(String, List)
- Return a single folder 'inbox'
-
getHeaders(List, int, int)
- Retrieve all the mail headers parse into a List
-
getMessage(int, boolean)
- Retrieve a specific message.
-
getMessage(TextArea, int, boolean)
- Retrieve a specific message into a TextArea
-
login(String, String)
- Login to the connected mail server using a userid and password
-
logout()
- Logoff from the connected mail server using a userid and password
-
openBox(String)
- Open a mail box folder for reading
-
parseFlags(Response)
- Determine the available flags values (eg.
-
parseHeader(List, Response, int)
- Parse a server response for the mail headers and place
them into a list component.
-
parseNumMessages(Response)
- Determine the number of messages in the mail box
-
parseNumRecent(Response)
- Determine the number of un-seen messages in the mail box
-
parsePermanentFlags(Response)
- Determine the available permanent flags values (eg.
-
purgeMessages()
- Purge all deleted messages
-
undeleteMessage(int)
- Un-delete a specific message
MailConnection
public MailConnection()
connect
public abstract String connect(String server) throws ExceptionMailConnection
- Connect to a server. Will setup the private
stream objects and read the mail server greeting. The
extender of this class must provide the port.
- Parameters:
- server - the mail server name (eg. mail.domain.com)
- Returns:
- the mail server greeting string
connect
public synchronized String connect(String server,
int port) throws ExceptionMailConnection
- Connect to a server on a port. Will setup the private
stream objects and read the mail server greeting.
- Parameters:
- server - the mail server name (eg. mail.domain.com)
- port - the server socket port # (110 or 143)
- Returns:
- the mail server greeting string
getFolders
public Response getFolders(String dir,
List list) throws ExceptionMailConnection
- Return a single folder 'inbox'
- Parameters:
- dir - the root directory for mail folders (eg. ~user/mail)
- name - the mailbox folder to open (default: 'inbox'
- Returns:
- null
All Packages Class Hierarchy This Package Previous Next Index