IP*Works! V8

ipworks
Class Pop

java.lang.Object
  |
  +--ipworks.Pop

public class Pop
extends java.lang.Object

The POP bean is used retrieve electronic mail from Internet Post Office servers (POP).

The POP bean implements a standard internet post office (POP3) client as specified in RFC 1725.

To connect to a MailServer first set the appropriate User and Password and then connect by calling the Connect method. Upon successful connection to the MailServer , the number of waiting messages is shown by the MessageCount property. A message is selected by setting the MessageNumber property to a number between 1 and MessageCount (inclusive). Then, message text and/or headers are received by calling the Retrieve method.

The message text is received through the Transfer event, whereas the message headers are received through the Header event. Additionally, up to MaxLines from the message body are provided in the MessageText property. The body of the message is also saved in the file specified by the LocalFile property. StartTransfer and EndTransfer events are fired at the beginning and end of message transmission. The PITrail event provides a trace of the interaction between the client and server (excluding message transfers).


Field Summary
static int amAPOP
           
static int amCRAMMD5
           
static int amNTLM
           
static int amUserPassword
           
 
Constructor Summary
Pop()
           
 
Method Summary
 void addPopEventListener(ipworks.PopEventListener l)
           
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a beanconfiguration setting.
 void connect()
          Connects to the mail server and attempts to login.
 void delete()
          Delete a message specified by MessageNumber on the server.
 void disconnect()
          Disconnects from the mail server.
 void doEvents()
          Processes events from the internal message queue.
 int getAuthMechanism()
          The authentication mechanism to be used when connecting to the mail server.
 ipworks.Firewall getFirewall()
          A set of properties related to firewall access.
 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.
 int getMailPort()
          The server port for POP (default 110).
 java.lang.String getMailServer()
          The name or address of a mail server (internet post office server).
 int getMaxLines()
          The maximum number of message lines besides headers to retrieve.
 java.lang.String getMessageCc()
          The value of the Cc header of the last retrieved message.
 int getMessageCount()
          The number of messages waiting in the mailbox.
 java.lang.String getMessageDate()
          The value of the Date: header of the last retrieved message.
 java.lang.String getMessageFrom()
          The value of the From header of the last retrieved message.
 HeaderList getMessageHeaders()
          Collection of the message headers as retrieved from the server.
 java.lang.String getMessageHeadersString()
          A string representation of the full headers of the message as retrieved from the server.
 int getMessageNumber()
          Current (selected) message.
 MessageRecipientList getMessageRecipients()
          A collection of recipients for the current message.
 java.lang.String getMessageReplyTo()
          The value of the Reply-To header of the last retrieved message.
 int getMessageSize()
          The size in bytes of the current message.
 java.lang.String getMessageSubject()
          The value of the Subject header of the last retrieved message.
 java.lang.String getMessageText()
          The full text of the message as retrieved from the server.
 java.lang.String getMessageTo()
          The value of the To header of the last retrieved message.
 java.lang.String getMessageUID()
          The unique id of the message as specified by the server.
 java.lang.String getPassword()
          The password for the mailbox user.
 int getTimeout()
          A timeout for the bean.
 long getTotalSize()
          Cumulative size in bytes of messages in the mailbox (including headers).
 java.lang.String getUser()
          The user id for the mailbox.
 void interrupt()
          Interrupt the current method.
 boolean isConnected()
          Shows whether the bean is connected.
 boolean isIdle()
          The current status of the component.
 boolean isIncludeHeaders()
          Instructs the component to include the headers in the MessageText and LocalFile .
 void listMessageSizes()
          Retrieves a list of all message sizes from the server.
 void listMessageUIDs()
          Retrieves a list of all message UID-s from the server.
 java.lang.String localizeDate(java.lang.String dateTime)
          Converts a valid RFC 822 message date to local date and time.
 void removePopEventListener(ipworks.PopEventListener l)
           
 void reset()
          Reset all changes and revert back to the state when the user first connected.
 void retrieve()
          Retrieve a message specified by MessageNumber from the server.
 void retrieveHeaders()
          Retrieve headers for a message specified by MessageNumber .
 void setAuthMechanism(int authMechanism)
          The authentication mechanism to be used when connecting to the mail server.
 void setCommand(java.lang.String command)
          Can be used to send additional commands directly to the server.
 void setConnected(boolean connected)
          Shows whether the bean is connected.
 void setFirewall(ipworks.Firewall firewall)
          A set of properties related to firewall access.
 void setIncludeHeaders(boolean includeHeaders)
          Instructs the component to include the headers in the MessageText and LocalFile .
 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 setMailPort(int mailPort)
          The server port for POP (default 110).
 void setMailServer(java.lang.String mailServer)
          The name or address of a mail server (internet post office server).
 void setMaxLines(int maxLines)
          The maximum number of message lines besides headers to retrieve.
 void setMessageNumber(int messageNumber)
          Current (selected) message.
 void setMessageStream(java.io.OutputStream messageStream)
          Retrieve headers for a message specified by MessageNumber .
 void setPassword(java.lang.String password)
          The password for the mailbox user.
 void setTimeout(int timeout)
          A timeout for the bean.
 void setUser(java.lang.String user)
          The user id for the mailbox.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

amUserPassword

public static final int amUserPassword
See Also:
Constant Field Values

amCRAMMD5

public static final int amCRAMMD5
See Also:
Constant Field Values

amAPOP

public static final int amAPOP
See Also:
Constant Field Values

amNTLM

public static final int amNTLM
See Also:
Constant Field Values
Constructor Detail

Pop

public Pop()
Method Detail

getAuthMechanism

public int getAuthMechanism()
The authentication mechanism to be used when connecting to the mail server.

By default, AuthMechanism is amUserPassword (0), and default plaintext authentication is used to login to the server. Other, more secure, options include amCRAMMD5 (1) for CRAM-MD5, and amAPOP (2) for APOP authentication.

If AuthMechanism is set to amNTLM (3) NTLM authentication will be used. This option is only available in the SSL package.


setAuthMechanism

public void setAuthMechanism(int authMechanism)
                      throws IPWorksException
The authentication mechanism to be used when connecting to the mail server.

By default, AuthMechanism is amUserPassword (0), and default plaintext authentication is used to login to the server. Other, more secure, options include amCRAMMD5 (1) for CRAM-MD5, and amAPOP (2) for APOP authentication.

If AuthMechanism is set to amNTLM (3) NTLM authentication will be used. This option is only available in the SSL package.

IPWorksException

setCommand

public void setCommand(java.lang.String command)
                throws IPWorksException
Can be used to send additional commands directly to the server.

Check the LastReply property and/or trap the PITrail events comming from the server to get the response.

IPWorksException

isConnected

public boolean isConnected()
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.


setConnected

public void setConnected(boolean connected)
                  throws IPWorksException
Shows whether the bean is connected.

Use this property to determine whether the bean is connected to the remote host or not.

IPWorksException

getFirewall

public ipworks.Firewall getFirewall()
A set of properties related to firewall access.

This is a FIREWALL type property which contains fields describing the firewall through which the bean will attempt to connect.


setFirewall

public void setFirewall(ipworks.Firewall firewall)
                 throws IPWorksException
A set of properties related to firewall access.

This is a FIREWALL type property which contains fields describing the firewall through which the bean will attempt to connect.

IPWorksException

isIdle

public boolean isIdle()
The current status of the component.

Idle will be False if the component is currently busy (communicating and/or waiting for an answer), and True at all other times.


isIncludeHeaders

public boolean isIncludeHeaders()
Instructs the component to include the headers in the MessageText and LocalFile .

If set to true, the headers coming from server will be preceeding the message body in the MessageText property; if LocalFile is set, then the headers will be written in it before the message body. This way, if the message is mime encoded, the whole content can be passed to mime for further message processing.


setIncludeHeaders

public void setIncludeHeaders(boolean includeHeaders)
                       throws IPWorksException
Instructs the component to include the headers in the MessageText and LocalFile .

If set to true, the headers coming from server will be preceeding the message body in the MessageText property; if LocalFile is set, then the headers will be written in it before the message body. This way, if the message is mime encoded, the whole content can be passed to mime for further message processing.

IPWorksException

getLastReply

public java.lang.String getLastReply()
The last reply from the server.

This is the last reply received from the server. It can be used for information purposes. The same information and more can also be retrieved through the PITrail event.


getLocalFile

public java.lang.String getLocalFile()
The path to a local file for downloading the message body. If the file exists, it is overwritten. (optional)

The LocalFile property is used when retrieving a message. If LocalFile is empty then the received data is provided through the parameters of the Transfer event


setLocalFile

public void setLocalFile(java.lang.String localFile)
                  throws IPWorksException
The path to a local file for downloading the message body. If the file exists, it is overwritten. (optional)

The LocalFile property is used when retrieving a message. If LocalFile is empty then the received data is provided through the parameters of the Transfer event

IPWorksException

getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system 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 bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean 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.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system 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 bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean 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.

IPWorksException

getMailPort

public int getMailPort()
The server port for POP (default 110).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.


setMailPort

public void setMailPort(int mailPort)
                 throws IPWorksException
The server port for POP (default 110).

A valid port number (a value between 1 and 65535) is required for the connection to take place. The property must be set before a connection is attempted and cannot be changed once a connection is established. Any attempt to change this property while connected will fail with an error.

IPWorksException

getMailServer

public java.lang.String getMailServer()
The name or address of a mail server (internet post office server).

The 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 the bean throws an IPWorksException raises an IPWorksException exception .

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceeded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.


setMailServer

public void setMailServer(java.lang.String mailServer)
                   throws IPWorksException
The name or address of a mail server (internet post office server).

The 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 the bean throws an IPWorksException raises an IPWorksException exception .

If the bean is configured to use a SOCKS firewall, the value assigned to this property may be preceeded with a "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution.

IPWorksException

getMaxLines

public int getMaxLines()
The maximum number of message lines besides headers to retrieve.

The MaxLines property is to limit the number of text lines besides headers retrieved for messages. It can be used to preview message headers and a portion of their contents, without incurring the overhead of downloading the entire message.

The default value of the property is 0. In this case the entire message will be retrieved, without interruptions.


setMaxLines

public void setMaxLines(int maxLines)
                 throws IPWorksException
The maximum number of message lines besides headers to retrieve.

The MaxLines property is to limit the number of text lines besides headers retrieved for messages. It can be used to preview message headers and a portion of their contents, without incurring the overhead of downloading the entire message.

The default value of the property is 0. In this case the entire message will be retrieved, without interruptions.

IPWorksException

getMessageCc

public java.lang.String getMessageCc()
The value of the Cc header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageCount

public int getMessageCount()
The number of messages waiting in the mailbox.

When the bean is not connected to the server, the value of the MessageCount property is 0. When connected, it contains the number of messages in the mail box as reported by the POP server.


getMessageDate

public java.lang.String getMessageDate()
The value of the Date: header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageFrom

public java.lang.String getMessageFrom()
The value of the From header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageHeaders

public HeaderList getMessageHeaders()
Collection of the message headers as retrieved from the server.

If the bean is not connected, or MessageNumber does not contain a valid message number, the value of this property is an empty collection. Otherwise, it contains a parsed collection of the full headers of the mail message as reported by the server.

The MailServer is asked about the headers of the message only if the MessageNumber property has changed. If MessageNumber has not changed, the bean returns a cached value.

Example (Connect and Retrieve Message)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 MessageText = POPControl.MessageText
 MessageHeaders = POPControl.MessageHeaders 


getMessageHeadersString

public java.lang.String getMessageHeadersString()
A string representation of the full headers of the message as retrieved from the server.

If the bean is not connected, or MessageNumber does not contain a valid message number, the value of this property is an empty string. Otherwise, it contains the full headers of the mail message as reported by the server.

The MailServer is asked about the headers of the message only if the MessageNumber property has changed. If MessageNumber has not changed, the bean returns a cached value.

Example (Connect and Retrieve Message)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 MessageText = POPControl.MessageText
 MessageHeadersString = POPControl.MessageHeadersString 


getMessageNumber

public int getMessageNumber()
Current (selected) message.

The MessageNumber property specifies a message number in between 1 and MessageCount . The various bean methods related to single messages use this property as a message pointer (see method descriptions and the MessageSize property).


setMessageNumber

public void setMessageNumber(int messageNumber)
                      throws IPWorksException
Current (selected) message.

The MessageNumber property specifies a message number in between 1 and MessageCount . The various bean methods related to single messages use this property as a message pointer (see method descriptions and the MessageSize property).

IPWorksException

getMessageRecipients

public MessageRecipientList getMessageRecipients()
A collection of recipients for the current message.

This collection describes all of the people to whom the last retrieved message was sent. Each MESSAGERECIPIENT contains information describing that recipient, and what type of recipient it is.

This collection is indexed from 0 to Count - 1.


getMessageReplyTo

public java.lang.String getMessageReplyTo()
The value of the Reply-To header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageSize

public int getMessageSize()
The size in bytes of the current message.

If the bean is not connected, or MessageNumber does not contain a valid message number, the value of this property is 0. Otherwise, it contains the size of the mail message (including headers) as reported by the server.

The MailServer is asked about the size of the message only if the MessageNumber property has changed. If MessageNumber has not changed, the bean returns a cached value.


getMessageSubject

public java.lang.String getMessageSubject()
The value of the Subject header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageText

public java.lang.String getMessageText()
The full text of the message as retrieved from the server.

If the bean is not connected, or MessageNumber does not contain a valid message number, the value of this property is an empty string. Otherwise, it contains the text of the mail message as reported by the server (a maximum of MaxLines ).

The MailServer is asked about the text of the message only if the MessageNumber property has changed. If MessageNumber has not changed, the bean returns a cached value.

Example (Connect and Retrieve Message)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 MessageText = POPControl.MessageText
 MessageHeaders = POPControl.MessageHeaders 


getMessageTo

public java.lang.String getMessageTo()
The value of the To header of the last retrieved message.

The same information may also be retrieved through the Header event.


getMessageUID

public java.lang.String getMessageUID()
The unique id of the message as specified by the server.

If the bean is not connected, or MessageNumber does not contain a valid message number, the value of this property is an empty string. Otherwise, it contains the UID of the mail message as reported by the server.

The MailServer is asked about the UID of the message only if the MessageNumber property has changed. If MessageNumber has not changed, the bean returns a cached value.


getPassword

public java.lang.String getPassword()
The password for the mailbox user.

This property must be set before the bean connects to the MailServer .


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksException
The password for the mailbox user.

This property must be set before the bean connects to the MailServer .

IPWorksException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean 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 remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behaviour of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion, or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean 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 remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an IPWorksException raises an IPWorksException exception .

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when data is successfully sent or received.

Optionally, the behaviour of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by theAbsoluteTimeoutconfiguration setting.

The default value for the Timeout property is 60 (seconds).

IPWorksException

getTotalSize

public long getTotalSize()
Cumulative size in bytes of messages in the mailbox (including headers).

When the bean is not connected to the server, the value of the TotalSize property is 0. When connected, it contains the cumulative size of all the messages in the mail box as reported by the POP server.


getUser

public java.lang.String getUser()
The user id for the mailbox.

This property must be set before the bean connects to the MailServer .


setUser

public void setUser(java.lang.String user)
             throws IPWorksException
The user id for the mailbox.

This property must be set before the bean connects to the MailServer .

IPWorksException

config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksException
Sets or retrieves a beanconfiguration setting.

Config is a generic method available in every bean. It is used to set and retrieveconfiguration settingsfor the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

IPWorksException

connect

public void connect()
             throws IPWorksException
Connects to the mail server and attempts to login.

Connects to the mail server and attempts to login using the current User and Password . Then it retrieves initial statistics about the mailbox contents ( MessageCount and TotalSize ).

Example (Connect to POP Mailbox)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 POPControl.Retrieve()
 MessageText = POPControl.MessageText
 MessageHeaders = POPControl.MessageHeaders 

IPWorksException

delete

public void delete()
            throws IPWorksException
Delete a message specified by MessageNumber on the server.

Asks the MailServer to delete the message specified by MessageNumber . The message will not actually be deleted from the server until the connection is closed. In order to cancel a previous Delete, use the Reset method.

IPWorksException

disconnect

public void disconnect()
                throws IPWorksException
Disconnects from the mail server.

Makes the bean disconnect from the MailServer by sending the QUIT command. If successful, all changes to the mailbox are committed by the server. Otherwise, changes are rolled back to the initial state that the server was in before the connection.

IPWorksException

doEvents

public void doEvents()
              throws IPWorksException
Processes events from the internal message queue.

When DoEvents is called, the bean processes any available events. If no events are available, it waits for a preset period of time, and then returns.

IPWorksException

interrupt

public void interrupt()
               throws IPWorksException
Interrupt the current method.

If there is no method in progress, Interrupt simply returns doing nothing.

IPWorksException

listMessageSizes

public void listMessageSizes()
                      throws IPWorksException
Retrieves a list of all message sizes from the server.

For each message listed, a MessageList event will fire containing the number and size of the message.

IPWorksException

listMessageUIDs

public void listMessageUIDs()
                     throws IPWorksException
Retrieves a list of all message UID-s from the server.

For each message listed, a MessageList event will fire containing the number and UID of the message.

IPWorksException

localizeDate

public java.lang.String localizeDate(java.lang.String dateTime)
                              throws IPWorksException
Converts a valid RFC 822 message date to local date and time.

This method can be used to convert an RFC 822 date/time string to the corresponding local date and time.

Dates will be returned in the format: "MM/dd/yyyy hh:mm:ss".

IPWorksException

reset

public void reset()
           throws IPWorksException
Reset all changes and revert back to the state when the user first connected.

Asks the MailServer to reset all changes and revert back to the state it was when connected.

IPWorksException

retrieve

public void retrieve()
              throws IPWorksException
Retrieve a message specified by MessageNumber from the server.

Asks the MailServer to retrieve the message specified by MessageNumber . The message headers will arrive in the Header event, and the message text will arrive in the Transfer event.

The MaxLines property defines the number of lines retrieved.

Example (Connect and Retrieve Message)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 POPControl.Retreive() 

IPWorksException

retrieveHeaders

public void retrieveHeaders()
                     throws IPWorksException
Retrieve headers for a message specified by MessageNumber .

Calling this method will retrieve the headers for the message specified by the MessageNumber property. The message headers will be provided by the Header event and also stored in the MessageHeaders property.

Example (Connect and Retrieve Message Headers)

 POPControl.MailServer = "MyPOPServer"
 POPControl.User = "username"
 POPControl.Password = "password"
 POPControl.Connect()
 
 POPControl.MessageNumber = 1
 POPControl.RetreiveHeaders() 

IPWorksException

setMessageStream

public void setMessageStream(java.io.OutputStream messageStream)
                      throws IPWorksException
Retrieve headers for a message specified by MessageNumber .

Calling this method will retrieve the headers for the message specified by the MessageNumber property. The message headers will be provided by the Header event and also stored in the MessageHeaders property.

IPWorksException

addPopEventListener

public void addPopEventListener(ipworks.PopEventListener l)
                         throws java.util.TooManyListenersException
java.util.TooManyListenersException

removePopEventListener

public void removePopEventListener(ipworks.PopEventListener l)

IP*Works! V8

Copyright (c) 2007 /n software inc. - All rights reserved.