Constructor
new TubMailReceiverBind(paramsObj)
Arguments:
-
paramsObj
(Object)
 parameters objectProperties
-
host
(String)
 host of mail server -
port
(String)
 port of mail server -
[user='']
(String)
 user login on mail server -
[password='']
(String)
 user password on mail server -
[tls=false]
(Boolean)
 use tls. Inmodule:@unitybase/mailer
tls is not implemented so you will get an exception when set this value true. For using tls usemodule:@unitybase/mailer-ssl
class
-
Methods
getMessagesCount() → Number
static
Count of messages on server
getMessageSize(index) → Number
static
Get size of message
Arguments:
-
index
(Number)
 Index of mail message on server. Indexes starts from 1
receive(index) → TubMimeMessBind
static
Receive message from server
Arguments:
-
index
(Number)
 Index of mail message on server. Indexes starts from 1
top(index, maxLines) → TubMimeMessBind
static
Receive message headers and first maxLines strings of message
Arguments:
-
index
(Number)
 Index of mail message on server. Indexes starts from 1
-
maxLines
(Number)
 Count of message lines to receive
deleteMessage(index) → 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
Arguments:
-
index
(Number)
 Index 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.
index
(Number)
 Index of mail message on server. Indexes starts from 1
index
(Number)
 Index of mail message on server. Indexes starts from 1
index
(Number)
 Index of mail message on server. Indexes starts from 1
maxLines
(Number)
 Count of message lines to receive
index
(Number)
 Index of mail message on server. Indexes starts from 1