Method POP3Client():new() Professional

Creates an instance of the POP3Client class.

Syntax
POP3Client():new( <cPOP3Server> , ;
                  [<nPort>]     , ;
                  <cUserName>   , ;
                  <cPassWord>   , ;
                  [<oLogWriter>], ;
                  [<nLogLevel>]   ) --> oPOP3Client
Parameters
<cPOP3Server>
This parameter is a character string containing the DNS name or the IP address of the POP3 server to which the client wants to connect. For example:
mail.alaska-software.com    DNS name 
199.288.377.466             IP address in dotted octet notation 
<nPort>
<nPort> is a numeric parameter indicating the port number to be used for client and server communication. If no value is passed in this parameter, the port defaults to POP3 standard port 110. The following table lists the port numbers and their meaning when connecting to POP3 servers:
Port numbers for connecting to POP3 servers
Port Number: Description
110 *) POP3 standard port. Communication is unencrypted.
995 Encrypted SSL connection (POP3S), can only be used with POP3 servers which support SSL.
  1. Default value used for
<cUserName>
A character string holding a user name known by the POP3 server must be passed as third parameter. The string is case insensitive.
<cPassWord>
The password for the user's mail account must be passed as character string. This string is case sensitive.
<oLogWriter>
Optionally, a user-defined object can be passed for <oLogWriter>. This object must have the method :write(). This method is called from a POP3Client object each time the mail server passes character strings containing additional information to the client. When the client wants to log this information, the corresponding data can be processed in the oLogWriter:write() method.
<nLogLevel>
The numeric values 0, 1 or 2 may be passed for <nLogLevel>. They define the level of log information routed to the <oLogWriter>object.
Log information levels
<nLogLevel> Description
0 Only errors are reported.
1 Errors and warnings are reported.
2 All communication with the mail server is reported.
Return

The method returns an instance of the POP3Client class.

Description

The method :new() creates a new POP3Client object. The parameters passed when calling :new() define operations performed later by the POP3 client object.

The <nPort> parameter has special meaning in terms of how communication occurs between the POP3 server and the client. By default, unencrypted communication is used via the POP3 standard port 110. If port 995 is used, however, the client performs an SSL negotiation right after connecting to the server. This is known as POP3S.

If the server waits on non-standard ports for incoming connections then the method :setConnectionSecurity() can be used to force the type of communication.

A prerequisite for successfully using the POP3Client class is that the user name and password of the mail account hosted on the POP3 server are known. A connection to a POP3 server fails without proper authentication.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.