Skip to main content

Extendability

Many packages try to abstract as much as they can and lock you in to their way of doing things. You start using a package to make your life easier, however in the end when you have a custom usecase that the package doesn't solve, you are left on your own to basically build it from scratch.

That is why cf-imap exposes the raw socket which is used by the package to communicate with the IMAP server, text decoder & encoder as well as the writer & reader.

cf-imap connects to the server, provides some functions that you might need, and gives you all of the tools it uses internally so you can build on top of it.

Of course, it isn't much. The real value and content of this package are the pre-defined functions, however if you do have a specific usecase, it's better to use the same socket, as well as the same writer and reader rather than creating new ones :)

Internal properties

PropertyDescriptionDocs
imap.socketRaw TCP socket used to communicate with the IMAP server.Link
imap.writerFunction that pipes an encoded message to the socket.Link
imap.readerInitialised TCP socket reader which contains a function that reads all new messages sent after the last read.Link
imap.encoderInitialised TextEncoder class.Link
imap.decoderInitialised TextDecoder class.Link