|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ipworks.Imap
The IMAP control is used to communicate with IMAP servers using the IMAP (Internet Message Access) protocol.
The IMAP control implements a standard IMAP client as specified in RFC 1730 and RFC 2060.
The first step in using the control is specifying a MailServer , a User to connect as, and a Password to authenticate with. After
that, one or more requests may be sent to the server via the control's
methods or by setting a corresponding Action . Results are retrieved
through events and a number of key properties.
Normally, after connecting to the server, a Mailbox is selected
(or examined) using the ExamineMailbox method or setting the
corresponding Action code. After the Mailbox is selected, MessageCount and RecentMessageCount show the number of messages
in the mailbox, and MailboxFlags show the flags pertaining to the
mailbox.
A number of operations may be performed by the server in response
to commands sent via the control's methods or the Action property.
The main arguments for most commands is the Mailbox property or the MessageSet property. The MessageSet property denotes either a
single message, or a range of messages. Other arguments are specified
through other properties such as SearchCriteria , MessageFlags , etc.
Responses are received through events such as MessageInfo , MailboxList , and also reflected to properties such as MessageText , MessageSubject , etc.
The MessagePart event describes the MIME structure of
retrieved messages. One MessagePart event is fired for every message part,
giving information about the particular part. Later on, message parts may be retrieved
separately through the FetchMessagePart method or appropriate Action .
This speeds up processing, by avoiding the need to retrieve full messages from
the server.
The PITrail event traces
the interaction between the client and the server. It includes all exchanges
except for transfers of messages, message parts, and message headers.
| Field Summary | |
static int |
fwNone
|
static int |
fwSOCKS4
|
static int |
fwSOCKS5
|
static int |
fwTunnel
|
static int |
imapAppendToMailbox
|
static int |
imapCheckMailbox
|
static int |
imapCloseMailbox
|
static int |
imapConnect
|
static int |
imapCopyToMailbox
|
static int |
imapCreateMailbox
|
static int |
imapDeleteMailbox
|
static int |
imapDisconnect
|
static int |
imapExamineMailbox
|
static int |
imapExpungeMailbox
|
static int |
imapGetMessageHeaders
|
static int |
imapGetMessageInfo
|
static int |
imapGetMessagePart
|
static int |
imapGetMessageText
|
static int |
imapIdle
|
static int |
imapListMailboxes
|
static int |
imapListSubscribedMailboxes
|
static int |
imapNoop
|
static int |
imapRenameMailbox
|
static int |
imapResetMessageFlags
|
static int |
imapSearchMailbox
|
static int |
imapSelectMailbox
|
static int |
imapSetMessageFlags
|
static int |
imapSubscribeMailbox
|
static int |
imapUnsetMessageFlags
|
static int |
imapUnsubscribeMailbox
|
| Constructor Summary | |
Imap()
|
|
| Method Summary | |
void |
addImapEventListener(ImapEventListener l)
|
void |
addMessageFlags(java.lang.String flags)
Add the specified flags to the messages specified by MessageSet . |
void |
appendToMailbox()
Appends the message in MessageText to the mailbox specified by Mailbox . |
void |
checkMailbox()
Sends a 'CHECK' command to the server. |
void |
closeMailbox()
Remove all messages marked with 'Deleted' flag from the currently selected mailbox and unselect mailbox. |
void |
connect()
Connect to an IMAP server. |
void |
copyToMailbox()
Copies the messages specified by MessageSet to the mailbox specified by Mailbox . |
void |
createMailbox()
Create a new mailbox specified by Mailbox . |
void |
deleteMailbox()
Delete a mailbox specified by Mailbox . |
void |
disconnect()
Disconnect from an IMAP server. |
void |
examineMailbox()
Select a Mailbox (Read-only mode). |
void |
expungeMailbox()
Remove all messages marked with 'Deleted' flag from the currently selected mailbox. |
void |
fetchMessageHeaders()
Get the message headers of messages specified by the MessageSet property. |
void |
fetchMessageInfo()
Get information about messages specified by the MessageSet property. |
void |
fetchMessagePart()
Get a message part specified by PartId . |
void |
fetchMessageText()
Get the message text of messages specified by the MessageSet property. |
void |
fireEndTransfer()
Fired when the message or the part data finishes transferring. |
void |
fireError(int errorCode,
java.lang.String description)
Information about errors during data delivery. |
void |
fireMailboxList(java.lang.String mailbox,
java.lang.String separator,
java.lang.String flags)
Fired for each mailbox received through the various imapListMailbox actions. |
void |
fireMessageInfo(java.lang.String messageId,
java.lang.String subject,
java.lang.String messageDate,
java.lang.String from,
java.lang.String flags,
int size)
Fired with information for the message(s) retrieved by the server. |
void |
fireMessagePart(java.lang.String partId,
int size,
java.lang.String contentType,
java.lang.String filename,
java.lang.String contentEncoding,
java.lang.String parameters,
java.lang.String multipartMode)
Fired for each message part when an imapGetMessageInfo action is performed. |
void |
firePITrail(int direction,
java.lang.String message)
Traces the commands sent to the mail server, and the respective replies. |
void |
fireStartTransfer()
Fired when the message or the part data starts transferring. |
void |
fireTransfer(int bytesTransferred,
java.lang.String text)
Fired while the message gets transferred from the MailServer . |
int |
getAction()
An action code for the component. |
int |
getEndByte()
The byte index where to end the transfer. |
byte[] |
getFirewallData()
Used to send other data to firewall. |
java.lang.String |
getFirewallHost()
Name or IP address of firewall (optional). |
java.lang.String |
getFirewallPassword()
A password if authentication is to be used connecting through the firewall. |
int |
getFirewallPort()
Port of the firewall to connect to. |
int |
getFirewallType()
Determines the type of firewall to connect through. |
java.lang.String |
getFirewallUser()
A user name if authentication is to be used connecting through a firewall. |
java.lang.String |
getLastReply()
The last reply from the server. |
java.lang.String |
getLocalFile()
The path to a local file for downloading the message body. |
java.lang.String |
getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
java.lang.String |
getMailbox()
Name of the mailbox selected on the server. |
java.lang.String |
getMailboxFlags()
Defined flags in the selected mailbox. |
int |
getMailPort()
The port of the IMAP server (default is 143). |
java.lang.String |
getMailServer()
The name or address of the mail server (IMAP server). |
java.lang.String |
getMessageBCc(int addressIndex)
Array property with the list of BCc recipients of the message. |
java.lang.String |
getMessageCc(int addressIndex)
Array property with the list of Cc recipients of the message. |
java.lang.String |
getMessageContentEncoding()
The ContentEncoding of the selected message. |
java.lang.String |
getMessageContentType()
The ContentType of the message. |
int |
getMessageCount()
The total number of messages on the Mailbox . |
java.lang.String |
getMessageDate()
The time the message was created. |
java.lang.String |
getMessageDeliveryTime()
The time the message was delivered to the mail server. |
java.lang.String |
getMessageFlags()
Flags of the current message. |
java.lang.String |
getMessageFrom()
The address of the author of the message. |
java.lang.String |
getMessageHeaders()
RFC822-encoded headers of the message. |
java.lang.String |
getMessageId()
The message id of the current message. |
java.lang.String |
getMessageInReplyTo()
The unique message ID of the message this one is in reply to. |
java.lang.String |
getMessageNetId()
The globally unique id of the message. |
java.lang.String |
getMessageReplyTo()
Email address(s) where replies to the message should be sent. |
java.lang.String |
getMessageSender()
The address of the sender of the message. |
java.lang.String |
getMessageSet()
The set of messages to operate on. |
int |
getMessageSize()
The size of the selected message. |
java.lang.String |
getMessageSubject()
The subject of the message. |
java.lang.String |
getMessageText()
The body of the retrieved message The control fills out MessageText with the contents of the message body
(in RFC822 format) when an imapGetMessageText operation is triggered
via the Action property. |
java.lang.String |
getMessageTo(int addressIndex)
Array property with the list of direct recipients of the message. |
java.lang.String |
getNewMailbox()
The new name of the mailbox during an imapRenameMailbox operation. |
java.lang.String |
getPartId()
The PartId of the part to retrieve. |
java.lang.String |
getPassword()
The password used to authenticate to the MailServer . |
int |
getRecentMessageCount()
Number of new messages on the Mailbox . |
java.lang.String |
getSearchCriteria()
Search criteria to use for search operations. |
int |
getStartByte()
The byte index where to start the transfer from. |
int |
getTimeout()
A timeout for the component. |
java.lang.String |
getUser()
The user name used to authenticate to the MailServer . |
void |
interrupt()
Interrupt the Action in progress (if any). |
boolean |
isConnected()
Shows whether the component is connected. |
boolean |
isPeekMode()
When set to True, the message Seen flag is not changed during reading. |
boolean |
isUIDMode()
If true, permanent message id-s are used instead of the default temporary id-s. |
void |
listMailboxes()
List all mailboxes matching all criteria in the Mailbox property. |
void |
listSubscribedMailboxes()
List all subscribed mailboxes matching all criteria in the Mailbox property. |
void |
noop()
Sends a 'NOOP' command to the server. |
void |
removeImapEventListener(ImapEventListener l)
|
void |
renameMailbox()
Change the name of Mailbox to NewMailbox . |
void |
resetMessageFlags()
Replace the flags of the messages specified by MessageSet with the flags specified by MessageFlags . |
void |
searchMailbox()
Search selected mailbox for specified text. |
void |
selectMailbox()
Select a Mailbox. |
void |
setAction(int action)
An action code for the component. |
void |
setCommand(java.lang.String command)
Can be used to send additional commands directly to the IMAP server. |
void |
setEndByte(int endByte)
The byte index where to end the transfer. |
void |
setFirewallData(byte[] firewallData)
Used to send other data to firewall. |
void |
setFirewallHost(java.lang.String firewallHost)
Name or IP address of firewall (optional). |
void |
setFirewallPassword(java.lang.String firewallPassword)
A password if authentication is to be used connecting through the firewall. |
void |
setFirewallPort(int firewallPort)
Port of the firewall to connect to. |
void |
setFirewallType(int firewallType)
Determines the type of firewall to connect through. |
void |
setFirewallUser(java.lang.String firewallUser)
A user name if authentication is to be used connecting through a firewall. |
void |
setLocalFile(java.lang.String localFile)
The path to a local file for downloading the message body. |
void |
setLocalHost(java.lang.String localHost)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
void |
setMailbox(java.lang.String mailbox)
Name of the mailbox selected on the server. |
void |
setMailPort(int mailPort)
The port of the IMAP server (default is 143). |
void |
setMailServer(java.lang.String mailServer)
The name or address of the mail server (IMAP server). |
void |
setMessageFlags(java.lang.String messageFlags)
Flags of the current message. |
void |
setMessageHeaders(java.lang.String messageHeaders)
RFC822-encoded headers of the message. |
void |
setMessageSet(java.lang.String messageSet)
The set of messages to operate on. |
void |
setMessageText(java.lang.String messageText)
The body of the retrieved message The control fills out MessageText with the contents of the message body
(in RFC822 format) when an imapGetMessageText operation is triggered
via the Action property. |
void |
setNewMailbox(java.lang.String newMailbox)
The new name of the mailbox during an imapRenameMailbox operation. |
void |
setPartId(java.lang.String partId)
The PartId of the part to retrieve. |
void |
setPassword(java.lang.String password)
The password used to authenticate to the MailServer . |
void |
setPeekMode(boolean peekMode)
When set to True, the message Seen flag is not changed during reading. |
void |
setSearchCriteria(java.lang.String searchCriteria)
Search criteria to use for search operations. |
void |
setStartByte(int startByte)
The byte index where to start the transfer from. |
void |
setTimeout(int timeout)
A timeout for the component. |
void |
setUIDMode(boolean UIDMode)
If true, permanent message id-s are used instead of the default temporary id-s. |
void |
setUser(java.lang.String user)
The user name used to authenticate to the MailServer . |
void |
subscribeMailbox()
Subscribe to the mailbox specified by Mailbox . |
void |
unsetMessageFlags()
Remove the flags specified by MessageFlags from the messages specified by MessageSet . |
void |
unsubscribeMailbox()
Unsubscribe from the mailbox specified by Mailbox . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int imapIdle
public static final int imapNoop
public static final int imapConnect
public static final int imapDisconnect
public static final int imapSelectMailbox
public static final int imapExamineMailbox
public static final int imapCreateMailbox
public static final int imapDeleteMailbox
public static final int imapRenameMailbox
public static final int imapSearchMailbox
public static final int imapAppendToMailbox
public static final int imapCopyToMailbox
public static final int imapCheckMailbox
public static final int imapExpungeMailbox
public static final int imapCloseMailbox
public static final int imapListMailboxes
public static final int imapListSubscribedMailboxes
public static final int imapSubscribeMailbox
public static final int imapUnsubscribeMailbox
public static final int imapGetMessageInfo
public static final int imapGetMessageHeaders
public static final int imapGetMessageText
public static final int imapGetMessagePart
public static final int imapResetMessageFlags
public static final int imapSetMessageFlags
public static final int imapUnsetMessageFlags
public static final int fwNone
public static final int fwTunnel
public static final int fwSOCKS4
public static final int fwSOCKS5
| Constructor Detail |
public Imap()
| Method Detail |
public int getAction()
Action property to a valid action code makes
the control perform the associated action. If the action completes
successfully, execution continues normally, and Action is
reset to 0 (Idle). If an error happens, then
an IPWorksException exception is raised.
Each action sends a command to the server, and waits until a reply is received. If there is no connection to the server, a connection is established automatically using the imapConnect action below.
The following are the possible values for the Action property
and the corresponding descriptions:
MailServer and authenticate
using the user name and password supplied in the User and Password properties.
Mailbox property.
The mailbox is selected in read/write mode (if the server permits).
Mailbox property
in read-only mode.
Mailbox property.
Mailbox property.
Mailbox property,
and the new name is specified by the NewMailbox property.
SearchCriteria property. For every message matching the criteria,
the equivalent of a imapGetMessageInfo action is performed
and a MessageInfo event is fired.
For more information about the format
of the search criteria, please refer to the SearchCriteria property.
MessageText to the mailbox
specified by Mailbox . If the MessageFlags property is not an
empty string, it's contents are supplied with the 'APPEND' command sent
to the server.
MessageSet property to
the mailbox specified by the Mailbox property.
Mailbox property. Matching mailboxes are returned through the MailboxList event.
Mailbox property. Matching mailboxes are returned through MailboxList event.
Mailbox property.
Mailbox property.
MessageSet property. This includes information about the message
envelope as well as message structure. Every time a message envelope
is retrieved, a MessageInfo event is fired, and
message envelope information is stored in properties such as: MessageSubject , MessageFrom , MessageTo , MessageCc , etc..
If the message is a multipart message, one or more MessagePart events are fired before the MessageInfo event - one for each message part.
MessageSet and stores them in the MessageHeaders property.
MessageSet .
If the LocalFile property contains a file name, the text is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the text is stored
in the MessageText property, as well as provided through
the Transfer event.
PartId property of
the message specified by the MessageSet property.
If the LocalFile property contains a file name, the message part is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the message part is stored
in the MessageText property, as well as provided through
the Transfer event.
MessageSet property with the flags specified by the MessageFlags property.
The format of the flags is specified by the IMAP RFCs.
MessageFlags property to
the messages specified by the MessageSet property.
The format of the flags is specified by the IMAP RFCs.
MessageFlags property from
the messages specified by the MessageSet property.
The format of the flags is specified by the IMAP RFCs.
public void setAction(int action)
throws IPWorksException
Action property to a valid action code makes
the control perform the associated action. If the action completes
successfully, execution continues normally, and Action is
reset to 0 (Idle). If an error happens, then
an IPWorksException exception is raised.
Each action sends a command to the server, and waits until a reply is received. If there is no connection to the server, a connection is established automatically using the imapConnect action below.
The following are the possible values for the Action property
and the corresponding descriptions:
MailServer and authenticate
using the user name and password supplied in the User and Password properties.
Mailbox property.
The mailbox is selected in read/write mode (if the server permits).
Mailbox property
in read-only mode.
Mailbox property.
Mailbox property.
Mailbox property,
and the new name is specified by the NewMailbox property.
SearchCriteria property. For every message matching the criteria,
the equivalent of a imapGetMessageInfo action is performed
and a MessageInfo event is fired.
For more information about the format
of the search criteria, please refer to the SearchCriteria property.
MessageText to the mailbox
specified by Mailbox . If the MessageFlags property is not an
empty string, it's contents are supplied with the 'APPEND' command sent
to the server.
MessageSet property to
the mailbox specified by the Mailbox property.
Mailbox property. Matching mailboxes are returned through the MailboxList event.
Mailbox property. Matching mailboxes are returned through MailboxList event.
Mailbox property.
Mailbox property.
MessageSet property. This includes information about the message
envelope as well as message structure. Every time a message envelope
is retrieved, a MessageInfo event is fired, and
message envelope information is stored in properties such as: MessageSubject , MessageFrom , MessageTo , MessageCc , etc..
If the message is a multipart message, one or more MessagePart events are fired before the MessageInfo event - one for each message part.
MessageSet and stores them in the MessageHeaders property.
MessageSet .
If the LocalFile property contains a file name, the text is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the text is stored
in the MessageText property, as well as provided through
the Transfer event.
PartId property of
the message specified by the MessageSet property.
If the LocalFile property contains a file name, the message part is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the message part is stored
in the MessageText property, as well as provided through
the Transfer event.
MessageSet property with the flags specified by the MessageFlags property.
The format of the flags is specified by the IMAP RFCs.
MessageFlags property to
the messages specified by the MessageSet property.
The format of the flags is specified by the IMAP RFCs.
MessageFlags property from
the messages specified by the MessageSet property.
The format of the flags is specified by the IMAP RFCs.
public void setCommand(java.lang.String command)
throws IPWorksException
Command property directs the control to send the assigned
command to the MailServer .
Check the LastReply property and/or trap the PITrail events
comming from the server to get the response(s).
public boolean isConnected()
public int getEndByte()
StartByte or EndByte contain values other than the
defaults (0), only the corresponding portion of the message part
is retrieved from the server.
Byte indexes start from 1. The default value for EndByte is 0
corresponding with the end of the message.
public void setEndByte(int endByte)
throws IPWorksException
StartByte or EndByte contain values other than the
defaults (0), only the corresponding portion of the message part
is retrieved from the server.
Byte indexes start from 1. The default value for EndByte is 0
corresponding with the end of the message.
public byte[] getFirewallData()
public void setFirewallData(byte[] firewallData)
throws IPWorksException
public java.lang.String getFirewallHost()
FirewallHost is given, requested connections will be
authenticated through the specified firewall when connecting.
If the FirewallHost property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the
search is not successful, an error is returned.
public void setFirewallHost(java.lang.String firewallHost)
throws IPWorksException
FirewallHost is given, requested connections will be
authenticated through the specified firewall when connecting.
If the FirewallHost property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the FirewallHost property is set to the corresponding address. If the
search is not successful, an error is returned.
public java.lang.String getFirewallPassword()
FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public void setFirewallPassword(java.lang.String firewallPassword)
throws IPWorksException
FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public int getFirewallPort()
FirewallHost . See the
description of the FirewallHost property for
details.
Note that the FirewallPort is set automatically
when FirewallType is set to a valid value. See the
description of the FirewallType property for
details.
public void setFirewallPort(int firewallPort)
throws IPWorksException
FirewallHost . See the
description of the FirewallHost property for
details.
Note that the FirewallPort is set automatically
when FirewallType is set to a valid value. See the
description of the FirewallType property for
details.
public int getFirewallType()
FirewallPort is set to 80.
FirewallPort is set to 1080.
FirewallPort is set to 1080.
public void setFirewallType(int firewallType)
throws IPWorksException
FirewallPort is set to 80.
FirewallPort is set to 1080.
FirewallPort is set to 1080.
public java.lang.String getFirewallUser()
FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public void setFirewallUser(java.lang.String firewallUser)
throws IPWorksException
FirewallHost is specified, the FirewallUser and FirewallPassword properties are used to connect and authenticate
to the given firewall. If the authentication fails, a trappable error is fired.
public java.lang.String getLastReply()
PITrail event.
public java.lang.String getLocalFile()
LocalFile property is used when retrieving a message
via the Action property.
If LocalFile is empty then
the received data is provided through the parameters of the Transfer event.
public void setLocalFile(java.lang.String localFile)
throws IPWorksException
LocalFile property is used when retrieving a message
via the Action property.
If LocalFile is empty then
the received data is provided through the parameters of the Transfer event.
public java.lang.String getLocalHost()
LocalHost property contains the name of the local host
as obtained by the gethostname() Winsock call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.
If the control is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
public void setLocalHost(java.lang.String localHost)
throws IPWorksException
LocalHost property contains the name of the local host
as obtained by the gethostname() Winsock call, or if the
user has assigned an IP address, the value of that address.
In multihomed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the control initiate connections (or accept in the case of server controls) only through that interface.
If the control is connected, the LocalHost property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multihomed
hosts (machines with more than one IP interface).
NOTE: LocalHost is not persistent. You must always set it in
code, and never in the property window.
public java.lang.String getMailbox()
Action property.
public void setMailbox(java.lang.String mailbox)
throws IPWorksException
Action property.
public java.lang.String getMailboxFlags()
MessageCount , RecentMessageCount ,
and MailboxFlags after connecting to the MailServer and selecting
or examining a Mailbox .
public int getMailPort()
MailPort property
while connected will fail with an error.
public void setMailPort(int mailPort)
throws IPWorksException
MailPort property
while connected will fail with an error.
public java.lang.String getMailServer()
MailServer property specifies the IP address (IP number in
dotted internet format) or Domain Name of the mail server.
It is set before a connection is attempted and cannot be changed
once a connection is in progress.
If the MailServer property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the MailServer property is set to the corresponding address. If the
search is not successful, an error is returned.
public void setMailServer(java.lang.String mailServer)
throws IPWorksException
MailServer property specifies the IP address (IP number in
dotted internet format) or Domain Name of the mail server.
It is set before a connection is attempted and cannot be changed
once a connection is in progress.
If the MailServer property is set to a Domain Name, a DNS request
is initiated and upon successful termination of the request, the MailServer property is set to the corresponding address. If the
search is not successful, an error is returned.
public java.lang.String getMessageBCc(int addressIndex)
throws IPWorksException
The BCc addresses are never shown to any of the recipients of the message but are stored in the original outgoing message.
public java.lang.String getMessageCc(int addressIndex)
throws IPWorksException
public java.lang.String getMessageContentEncoding()
Action .
public java.lang.String getMessageContentType()
MessageContentType property denotes the type of content contained
in the message, such as plain, multipart, multipart/alternative etc.
You may eventually need to check the MessageContentEncoding property
or read the individual message parts.
public int getMessageCount()
MessageCount , RecentMessageCount ,
and MailboxFlags after connecting to the MailServer and selecting
or examining a Mailbox .
public java.lang.String getMessageDate()
MessageDate holds the date and time when the message
was created. The format is described in RFC821.
public java.lang.String getMessageDeliveryTime()
public java.lang.String getMessageFlags()
Action property.
public void setMessageFlags(java.lang.String messageFlags)
throws IPWorksException
Action property.
public java.lang.String getMessageFrom()
MessageFrom has normally the same value as MessageSender .
There are cases when a message may have more than one From address.
If this is the case, the addresses are provided in the MessageFrom property separated by commas.
public java.lang.String getMessageHeaders()
Action .
public void setMessageHeaders(java.lang.String messageHeaders)
throws IPWorksException
Action .
public java.lang.String getMessageId()
MessageId property
when message information is retrieved from the MailServer through the Action property.
The id is permanent if UIDMode is set, and temporary otherwise.
public java.lang.String getMessageInReplyTo()
MessageInReplyTo with the value of
the In-Reply-To: message header.
This value can be useful when threading messages by referring to the message you are replying to.
The unique message Id of the message itself is given by the MessageNetId property.
public java.lang.String getMessageNetId()
MessageId with the value of the Message-Id: header. This is a globally unique value normally created by the first
mail server the message is sent to.
public java.lang.String getMessageReplyTo()
MessageReplyTo property separated by commas.
public java.lang.String getMessageSender()
MessageSender has normally the same value as MessageFrom .
There are cases when a message may have more than one sender.
If this is the case, the addresses are provided in the MessageSender property separated by commas.
public java.lang.String getMessageSet()
Action property.
It may consist of a single message number, a range of messages specified by two message numbers separated by ':' (e.g. "1:5"), and/or individual message numbers separated by ',' (e.g. "1:5,7,10").
public void setMessageSet(java.lang.String messageSet)
throws IPWorksException
Action property.
It may consist of a single message number, a range of messages specified by two message numbers separated by ':' (e.g. "1:5"), and/or individual message numbers separated by ',' (e.g. "1:5,7,10").
public int getMessageSize()
MessageSize property
when message information is retrieved from the MailServer through the Action property.
public java.lang.String getMessageSubject()
MessageSubject property
when message information is retrieved from the MailServer through the Action property.
public java.lang.String getMessageText()
MessageText with the contents of the message body
(in RFC822 format) when an imapGetMessageText operation is triggered
via the Action property.
public void setMessageText(java.lang.String messageText)
throws IPWorksException
MessageText with the contents of the message body
(in RFC822 format) when an imapGetMessageText operation is triggered
via the Action property.
public java.lang.String getMessageTo(int addressIndex)
throws IPWorksException
public java.lang.String getNewMailbox()
Action property to the
corresponding action value.
public void setNewMailbox(java.lang.String newMailbox)
throws IPWorksException
Action property to the
corresponding action value.
public java.lang.String getPartId()
PartId when Action is set to imapGetMessagePart .
The part id-s of each message part (if any) are provided through
the corresponding MessagePart events.
public void setPartId(java.lang.String partId)
throws IPWorksException
PartId when Action is set to imapGetMessagePart .
The part id-s of each message part (if any) are provided through
the corresponding MessagePart events.
public java.lang.String getPassword()
User and Password properties must be set
before connecting to the MailServer .
public void setPassword(java.lang.String password)
throws IPWorksException
User and Password properties must be set
before connecting to the MailServer .
public boolean isPeekMode()
PeekMode is True, a "PEEK" option is added to all IMAP FETCH
commands sent to the server. An RFC compliant IMAP server should not
set the "Seen" flag on the message in this case.
public void setPeekMode(boolean peekMode)
throws IPWorksException
PeekMode is True, a "PEEK" option is added to all IMAP FETCH
commands sent to the server. An RFC compliant IMAP server should not
set the "Seen" flag on the message in this case.
public int getRecentMessageCount()
MessageCount , RecentMessageCount ,
and MailboxFlags after connecting to the MailServer and selecting
or examining a Mailbox .
public java.lang.String getSearchCriteria()
Possible search keys include:
public void setSearchCriteria(java.lang.String searchCriteria)
throws IPWorksException
Possible search keys include:
public int getStartByte()
StartByte or EndByte contain values other than the
defaults (0), only the corresponding portion of the message part
is retrieved from the server.
Byte indexes start from 1.
public void setStartByte(int startByte)
throws IPWorksException
StartByte or EndByte contain values other than the
defaults (0), only the corresponding portion of the message part
is retrieved from the server.
Byte indexes start from 1.
public int getTimeout()
Timeout property is set to 0 (default value) all actions
will run uninterrupted until succesful completion, or an error condition
is encountered.
If Timeout is set to a positive value, and any action does not
complete within Timeout seconds, the action is aborted, and a 'Timeout' error is fired..
The control will use DoEvents to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and always remains responsive.
public void setTimeout(int timeout)
throws IPWorksException
Timeout property is set to 0 (default value) all actions
will run uninterrupted until succesful completion, or an error condition
is encountered.
If Timeout is set to a positive value, and any action does not
complete within Timeout seconds, the action is aborted, and a 'Timeout' error is fired..
The control will use DoEvents to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and always remains responsive.
public boolean isUIDMode()
UIDMode is true, permanent message id-s
are used instead.
The IMAP protocol operations where UID mode is used are the following: COPY , FETCH , STORE , SEARCH .
public void setUIDMode(boolean UIDMode)
throws IPWorksException
UIDMode is true, permanent message id-s
are used instead.
The IMAP protocol operations where UID mode is used are the following: COPY , FETCH , STORE , SEARCH .
public java.lang.String getUser()
User and Password properties must be set
before connecting to the MailServer .
public void setUser(java.lang.String user)
throws IPWorksException
User and Password properties must be set
before connecting to the MailServer .
public void fireEndTransfer()
ImapEndTransferEvent
public void fireError(int errorCode,
java.lang.String description)
ImapErrorEvent
public void fireMailboxList(java.lang.String mailbox,
java.lang.String separator,
java.lang.String flags)
ImapMailboxListEvent
public void fireMessageInfo(java.lang.String messageId,
java.lang.String subject,
java.lang.String messageDate,
java.lang.String from,
java.lang.String flags,
int size)
ImapMessageInfoEvent
public void fireMessagePart(java.lang.String partId,
int size,
java.lang.String contentType,
java.lang.String filename,
java.lang.String contentEncoding,
java.lang.String parameters,
java.lang.String multipartMode)
ImapMessagePartEvent
public void firePITrail(int direction,
java.lang.String message)
ImapPITrailEventpublic void fireStartTransfer()
ImapStartTransferEvent
public void fireTransfer(int bytesTransferred,
java.lang.String text)
ImapTransferEvent
public void addMessageFlags(java.lang.String flags)
throws IPWorksException
MessageSet property.
The format of the flags is specified by the IMAP RFCs.
public void appendToMailbox()
throws IPWorksException
MessageText to the mailbox
specified by Mailbox . If the MessageFlags property is not an
empty string, it's contents are supplied with the 'APPEND' command sent
to the server.
Calling this method is equivalent to setting the Action property
to imapAppendToMailbox .
public void checkMailbox()
throws IPWorksException
Calling this method is equivalent to setting the Action property
to imapCheckMailbox .
public void closeMailbox()
throws IPWorksException
Calling this method is equivalent to setting the Action property
to imapCloseMailbox .
public void connect()
throws IPWorksException
MailServer and authenticate
using the user name and password supplied in the User and Password properties.
Calling this method is equivalent to setting the Action property
to imapConnect .
public void copyToMailbox()
throws IPWorksException
MessageSet property to
the mailbox specified by the Mailbox property.
Calling this method is equivalent to setting the Action property
to imapCopyToMailbox .
public void createMailbox()
throws IPWorksException
Mailbox property.
Calling this method is equivalent to setting the Action property
to imapCreateMailbox .
public void deleteMailbox()
throws IPWorksException
Mailbox property.
Calling this method is equivalent to setting the Action property
to imapDeleteMailbox .
public void disconnect()
throws IPWorksException
Calling this method is equivalent to setting the Action property
to imapDisconnect .
public void examineMailbox()
throws IPWorksException
Mailbox property
in read-only mode.
Calling this method is equivalent to setting the Action property
to imapExamineMailbox .
public void expungeMailbox()
throws IPWorksException
Calling this method is equivalent to setting the Action property
to imapExpungeMailbox .
public void fetchMessageHeaders()
throws IPWorksException
MessageSet and stores them in the MessageHeaders property.
Calling this method is equivalent to setting the Action property
to imapGetMessageHeaders .
public void fetchMessageInfo()
throws IPWorksException
MessageSet property. This includes information about the message
envelope as well as message structure. Every time a message envelope
is retrieved, a MessageInfo event is fired, and
message envelope information is stored in properties such as: MessageSubject , MessageFrom , MessageTo , MessageCc , etc..
If the message is a multipart message, one or more MessagePart events are fired before the MessageInfo event - one for each message part.
Calling this method is equivalent to setting the Action property
to imapGetMessageInfo .
public void fetchMessagePart()
throws IPWorksException
PartId property of
the message specified by the MessageSet property.
If the LocalFile property contains a file name, the message part is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the message part is stored
in the MessageText property, as well as provided through
the Transfer event.
Calling this method is equivalent to setting the Action property
to imapGetMessagePart .
public void fetchMessageText()
throws IPWorksException
MessageSet .
If the LocalFile property contains a file name, the text is stored
in LocalFile , and the Transfer events denote the progress.
If the LocalFile property contains an empty string, the text is stored
in the MessageText property, as well as provided through
the Transfer event.
Calling this method is equivalent to setting the Action property
to imapGetMessageText .
public void interrupt()
throws IPWorksException
Action property
to Idle (0) .
public void listMailboxes()
throws IPWorksException
Mailbox property. Matching mailboxes are returned through the MailboxList event.
Calling this method is equivalent to setting the Action property
to imapListMailboxes .
public void listSubscribedMailboxes()
throws IPWorksException
Mailbox property. Matching mailboxes are returned through MailboxList event.
Calling this method is equivalent to setting the Action property
to imapListSubscribedMailboxes .
public void noop()
throws IPWorksException
Calling this method is equivalent to setting the Action property
to imapNoop .
public void renameMailbox()
throws IPWorksException
Mailbox property,
and the new name is specified by the NewMailbox property.
Calling this method is equivalent to setting the Action property
to imapRenameMailbox .
public void resetMessageFlags()
throws IPWorksException
MessageSet property with the flags specified by the MessageFlags property.
The format of the flags is specified by the IMAP RFCs.
Calling this method is equivalent to setting the Action property
to imapResetMessageFlags .
public void searchMailbox()
throws IPWorksException
SearchCriteria property. For every message matching the criteria,
the equivalent of a imapGetMessageInfo action is performed
and a MessageInfo event is fired.
For more information about the format
of the search criteria, please refer to the SearchCriteria property.
Calling this method is equivalent to setting the Action property
to imapSearchMailbox .
public void selectMailbox()
throws IPWorksException
Mailbox property.
The mailbox is selected in read/write mode (if the server permits).
Calling this method is equivalent to setting the Action property
to imapSelectMailbox .
public void subscribeMailbox()
throws IPWorksException
Mailbox property.
Calling this method is equivalent to setting the Action property
to imapSubscribeMailbox .
public void unsetMessageFlags()
throws IPWorksException
MessageFlags property from
the messages specified by the MessageSet property.
The format of the flags is specified by the IMAP RFCs.
Calling this method is equivalent to setting the Action property
to imapUnsetMessageFlags .
public void unsubscribeMailbox()
throws IPWorksException
Mailbox property.
Calling this method is equivalent to setting the Action property
to imapUnsubscribeMailbox .
public void addImapEventListener(ImapEventListener l)
throws java.util.TooManyListenersException
public void removeImapEventListener(ImapEventListener l)
|
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||