The POP3Client concept implements the client side of the Internet POP3 Protocol defined in RFC 1939.
Have a lot of methods for :
- connect to and disconnect form POP3 server
- login to and logout from POP3 server
- get list of messages form mailbox
- get and delete specified message
See RFC 1939 for more details on the POP3 protocol.
Connect to 'host' named POP3 server and login with
'user' and 'pwd', and get content of all messages from
the mailbox.
$pop3 TYPEOF POP3Client
$connected = $pop3.openConnection("pop3://hostName/")
if $connected then [
print "You are connected to POP3 server."
$logined = $pop3.login( "userName, "passwd")
if $logined then [
print "You are logined."
$messages = $pop3.getLinks
each $message in $messages do [
$nr = Integer.create ( $message.getTokens("(")/1.trim )
print $pop3.getMessage( $nr )
]
] else [
print "Login failed. " + $pop3@errorMessage
]
] else [
print "Conncetion failed. " + $pop3@errorMessage
]
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getConceptsAtPath, getErrorHandler, getInheritedConcepts, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML |
|
Label: | errorMessage |
Type: | String |
Is Static: | false |
Is Hidden: | false |
Show Empty: | true |
Stores that error message with which the last executed command returned.
Exceptions: |
closeConnection :
(Error) | If unable to close POP3 connection. |
Close the current connection.
Parameters: |
$messID : | The message ID to delete. |
|
Exceptions: |
POP3OperationFailed :
(Error) | If unable to delete message from the mailbox. |
Returnes true if the deleting of the message with the specified ID was
successfull, false otherwise.
Exceptions: |
POP3OperationFailed :
(Error) | If unable to get message form the mailbox. |
Returns a string containing the number of the listed message and the
size of the message in bytes.
Exceptions: |
POP3OperationFailed :
(Error) | If unable to get message list form the mailbox. |
Returns a series representing all messages in the order they appear in
the mailbox, each containing the number of a message and its size in
bytes. If there are no messages, this method returns a zero length
series.
Exceptions: |
POP3OperationFailed :
(Error) | If unable to get message from the mailbox. |
Returns the specified message content.
Parameters: |
$userName : | The user's name with which to connect. |
$password : | The user's password with which to connect. |
|
Exceptions: |
loginWarning :
(Warning) | If the specified user can not login into POP3 server. |
loginFailed :
(Error) | If the login failed into POP3 server. |
Returns true if the logging in with the specified $userName and
$password was successfull, false otherwise.
Exceptions: |
logoutFailed :
(Error) | If the logout failed form POP3 server. |
Returns true if the logging out was successfull, false otherwise.
Parameters: |
$url : | The url to the remote host. |
|
Exceptions: |
missingHost :
(Error) | If missing host name for POP3 connection. |
connectionRefuzed :
(Error) | If the POP3 server refuzed connection. |
unsupportedProtocol :
(Error) | If this protocol not supported by POP3Client. |
Returns true if the connection to the remote host with the specified
$url was successfull, false otherwise.