@ -81,6 +81,7 @@ node-imap exposes one object: **ImapConnection**.
* _ImapMessage_ is an Object representing an email message. It consists of:
* Properties:
* **id** - An Integer that uniquely identifies this message (within its mailbox).
* **seqno** - An Integer that designates this message's sequence number. This number changes when messages with smaller sequence numbers are deleted for example (see the ImapConnection's 'deleted' event).
* **flags** - An Array containing the flags currently set on this message.
* **date** - A String containing the internal server date for the message (always represented in GMT?)
* **headers** - An Object containing the headers of the message, **if headers were requested when calling fetch().** Note: The value of each property in the object is an Array containing the value(s) for that particular header name (just in case there are duplicate headers).
@ -193,6 +194,10 @@ ImapConnection Events
* **mail**(Integer) - Fires when new mail arrives in the currently open mailbox. The supplied Integer specifies the number of new messages.
* **deleted**(Integer) - Fires when a message is deleted from another IMAP connection's session. The Integer value is the *sequence number* (instead of the unique ID) of the message that was deleted. The sequence numbers of all messages higher than this value **MUST** be decremented by 1 in order to stay synchronized with the server and to keep continuity of sequence numbers.
* **msgupdate**(ImapMessage) - Fires when a message's flags have changed, generally from another IMAP connection's session. With that in mind, the only available properties in this case will almost always be 'seqno' and 'flags' (and obviously no 'data' or 'end' events will be emitted on the object).
* **close**(Boolean) - Fires when the connection is completely closed (similar to net.Stream's close event). The specified Boolean indicates whether the connection was terminated due to a transmission error or not.
* **end**() - Fires when the connection is ended (similar to net.Stream's end event).