Binding to a native implementation of POP3 receiver.
Should be created using TubMailReceiver method of module:@unitybase/mailer module
# new TubMailReceiver (paramsObj: Object)
Arguments:
paramsObj
: Objecthost
: Stringhost of mail server
port
: Stringport of mail server
user
='': Stringuser login on mail server
password
='': Stringuser password on mail server
tls
: Booleanuse tls on server request. OpenSSL libraries version >= 0.9.7 must be installed - see package README.md for details
fullSSL
: BooleanSetup TLS before any POP3 command
parameters object
Methods
# deleteMessage (index: Number) → Boolean static
Mark the message to delete. The message will be removed indeed, when reconnect to the server or the object is destroyed. For destroy object immediately use freeNative, for reconnect use reconnect() method
Return:
True if successfully, in opposite case raise exception
Arguments:
index
: NumberIndex of mail message on server. Indexes starts from 1
# getMessagesCount () → Number static
Count of messages on server
# getMessageSize (index: Number) → Number static
Get size of message
Arguments:
index
: NumberIndex of mail message on server. Indexes starts from 1
# receive (index: Number) → TubMimeMessBind static
Receive message from server
Arguments:
index
: NumberIndex of mail message on server. Indexes starts from 1
# reconnect () → Boolean static
Reconnect to mail server. Get new messages from server, delete marked for delete messages.
Return:
True if successfully, in opposite case raise exception
# top (index: Number, maxLines: Number) → TubMimeMessBind static
Receive message headers and first maxLines strings of message