Implements IMAP NOTIFY command encoding and execution for mailbox event subscriptions.
// Source: https://github.com/emersion/go-imap | License: MIT | Copyright 2013 The Go-IMAP Authors // Provided via justclaw.it.com; keep this notice with the code. package imapclient import ( "fmt" "github.com/emersion/go-imap/v2" "github.com/emersion/go-imap/v2/internal/imapwire" ) // Notify sends a NOTIFY command (RFC 5465). // // The NOTIFY command allows clients to request server-push notifications // for mailbox events like new messages, expunges, flag changes, etc. // // When NOTIFY SET is active, the server may send unsolicited responses at any // time (STATUS, FETCH, EXPUNGE, LIST responses). These unsolicited responses // are delivered via the UnilateralDataHandler callbacks set in // imapclient.Options. // // When the server sends NOTIFICATIONOVERFLOW, the NotificationOverf ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key