Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

Utilities.getPOP3Messages

Gets a vector of mail messages from a POP3 server.

There are two variants; their differences are as follows:


Utilities.getPOP3Messages

Retrieves a vector of messages from a POP3 server.

Syntax

Parameters

host
The host name of the POP3 server that holds this user's e-mail.

user
The user's account name.

password
The user's password.

bRemove
A boolean value. Set to true to remove the messages from the POP3 server after they are downloaded. Set to false to keep the messages on the POP3 server.

Description

The getPOP3Messages method retrieves a vector of messages from a POP3 server. The default connection timeout is 120 seconds.

The Utilities class provides a msgBody field, which you use to locate the body portion of a returned getPOP3Messages() element. It holds the name of the field in the message hashtable that contains the body of the message. (Other fields contain header information.)

Returns

Returns a vector of messages, or null. A message is a hashtable where each key is the name of a header field (the names are converted to lower case) and the value is the content of that header field. The name of the field that stores the body of the message is provided by Utilities.Methods.

Example

The following code downloads joe_user's e-mail and then displays its subject:


Utilities.getPOP3Messages

Retrieves a vector of messages from a POP3 server.

Syntax

Parameters

host
The host name of the POP3 server that holds this user's e-mail.

user
The user's account name.

password
The user's password.

bRemove
A boolean value. Set to true to remove the messages from the POP3 server after they are downloaded. Set to false to keep the messages on the POP3 server.

ctimeout (optional)
The connection timeout in seconds. If not set, the default connection timeout is 120 seconds.

Description

The getPOP3Messages method retrieves a vector of messages from a POP3 server. The default connection timeout is 120 seconds.

Returns

Returns a vector of messages, or null. A message is a hashtable where each key is the name of a header field (the names are converted to lower case) and the value is the content of that header field. The name of the field that stores the body of the message is provided by Utilities.Methods.

 

  Home > Contents > Index >

Oracle JAVA Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.