mail.imap
import mail
Everything here is re-exported by
import mailis enough and the names are called asmail.*. Importingmail.imapon its own works too and reaches the same definitions.
IMAP: reading mail where it is kept, rather than taking it away.
Both ends are here. ImapClient talks to a server; ImapServer is one,
answering out of a MailStore of which two ship.
import mail.imap { ImapClient }
var inbox = ImapClient.connect('imaps://mail.example.com', {
username: 'ann',
password: secret,
})
inbox.select('INBOX')
echo inbox.search('UNSEEN', true).length()
inbox.logout()
Submodules
| Module | Reached as | Summary |
|---|---|---|
mail.imap.client | mail.* | The reading end of IMAP. |
mail.imap.parser | import mail.imap.parser | The IMAP grammar: turning what a server says into something a program can read. |
mail.imap.server | mail.* | The serving end of IMAP. |
mail.imap.store | mail.* | Where an ImapServer keeps mail. |
2026, Richard Ore and Zuri contributors