POP3_Login

4D - Documentation   Français   English   German   Japanese   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next

version 6.5


POP3_Login (hostName; userName; password; aPOP; pop3_ID) Integer

ParameterTypeDescription
hostNameStringHost Name or IP address of the POP3 mail server
userNameStringUser name
passwordStringPassword
aPOPInteger0 = Cleartext Login, 1 = APOP Login
pop3_IDLongintReference to this POP3 login
Function resultIntegerError Code

Description

The POP3_Login command logs the user into the POP3 mail server with the given userName and password. If aPOP is 1 then the APOP mechanism (RFC#1321) is used to login. If aPOP is zero or not given then a normal cleartext password login is performed. The particular login is given a reference (pop3_ID) which subsequent commands can refer to.

Warning: POP3 servers were not designed to be accessed in an interactive fashion. Once you have logged in to a server you should perform whatever actions are needed and then log out of the server as soon as possible. Between your calls of POP3_Login and POP3_Logout, your procedure should not sit in any user-interactive screen. A POP3 server will automatically disconnect any sessions which do not show activity for a certain period of time. According to the RFC for POP3, the inactivity timer is supposed to be a minimum of 30 minutes. However, our experience has shown that most servers force inactive clients out after a much shorter period of time.

Each command that interacts with the POP3 server will force a reset of your inactivity timer. In the event that the server aborts your connection before you have issued a POP3_Logout call, any deletions you had performed would be rolled back.

hostName is the host name or IP address of the POP3 mail server. It is recommended that the host name be used, but if needed an IP address can be used.

userName is the user's name on the POP3 mail server. The userName should not contain the domain. For example, for the address "jack@4d.com", userName would be just "jack".

password is the password for userName on the POP3 mail server.

aPOP is an integer value indicating whether the APOP mechanism is used to login. A value of 1 will use the APOP mechanism. A zero value will perform a cleartext password login. The default value is zero.

pop3_ID is a long integer variable into which is returned a reference to the session just established. The variable will be used in all subsequent commands which perform actions related to this session.

See Also

POP3_Logout.


4D - Documentation   Français   English   German   Japanese   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next