Class com.tdac.mail.MailBox
All Packages Class Hierarchy This Package Previous Next Index
Class com.tdac.mail.MailBox
java.lang.Object
|
+----com.tdac.mail.MailBox
- public class MailBox
- extends Object
This class provides a conceptual mail box, independant of the
type of connection used to communicate with the mail server.
- Version:
- 1.0, 11/11/96
- Author:
- Timothy D. A. Cox
- See Also:
- MailConnection
-
flags
- list of flags available for the mail box (eg.
-
headers
- The list of message headers
-
messages
- The list of message bodies
-
name
- current mail box folder name (eg.
-
nummessages
- number of messages in the mail box
-
permanentflags
- list of permanent flags available for the mail box (eg.
-
recent
- number of un-seen messages in the mail box
-
MailBox(MailConnection)
- Construct a mail box via a mail connection object
-
close()
- Close the mail box folder
-
deleteMessage(int)
- Delete a mail message
-
getHeader(int)
- Retrieve a cached header
-
getHeadersToList(List)
- Retrieve all of the message headers from the server and
place them into a list component.
-
getMessageToTextArea(TextArea, int, boolean)
- Retrieve a message from the server and place it into a TextArea
component.
-
open(String)
- Open a mail box folder and determine the number of messages,
number of recent messages and the flags
-
purgeBox()
- Perform an 'expunge' to clear the deleted messages
-
refreshHeaders(List)
- Fill a java.awt.List component with the current message headers
-
unDeleteMessage(int)
- Un-delete a mail message
name
public String name
- current mail box folder name (eg. 'inbox')
flags
public Vector flags
- list of flags available for the mail box (eg. \Seen, \Deleted)
permanentflags
public Vector permanentflags
- list of permanent flags available for the mail box (eg. \Seen, \Deleted)
nummessages
public int nummessages
- number of messages in the mail box
recent
public int recent
- number of un-seen messages in the mail box
headers
public Hashtable headers
- The list of message headers
messages
public Hashtable messages
- The list of message bodies
MailBox
public MailBox(MailConnection con)
- Construct a mail box via a mail connection object
open
public boolean open(String mbname) throws InternalException
- Open a mail box folder and determine the number of messages,
number of recent messages and the flags
- Parameters:
- mbname - mail box folder name
close
public boolean close() throws InternalException
- Close the mail box folder
deleteMessage
public boolean deleteMessage(int i) throws InternalException
- Delete a mail message
- Parameters:
- i - message number to be deleted
unDeleteMessage
public boolean unDeleteMessage(int i) throws InternalException
- Un-delete a mail message
- Parameters:
- i - message number to be un-deleted
purgeBox
public boolean purgeBox() throws InternalException
- Perform an 'expunge' to clear the deleted messages
refreshHeaders
public void refreshHeaders(List l)
- Fill a java.awt.List component with the current message headers
- Parameters:
- l - the list component to be filled
getHeadersToList
public boolean getHeadersToList(List list) throws InternalException
- Retrieve all of the message headers from the server and
place them into a list component. They are also cached.
- Parameters:
- l - the list component to be filled
getHeader
public MailHeader getHeader(int num)
- Retrieve a cached header
- Parameters:
- l - message number to get
getMessageToTextArea
public boolean getMessageToTextArea(TextArea ta,
int msgnum,
boolean fullheader) throws InternalException
- Retrieve a message from the server and place it into a TextArea
component. This method will store the message body in a cache.
- Parameters:
- ta - the TextArea component to be filled
- msgnum - message to be retrieved
All Packages Class Hierarchy This Package Previous Next Index