Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
Login(username, password string) (cmd *imap.Command, err error)
Logout(timeout time.Duration) (cmd *imap.Command, err error)
Select(name string, readOnly bool) (mbox *imap.MailboxStatus, err error)
Store(seq *imap.SeqSet, item imap.StoreItem, value interface{}, ch chan *imap.Message) (err error)
Fetch(seqset *imap.SeqSet, items []imap.FetchItem, ch chan *imap.Message) (err error)
}
Client interface for IMAP interactions
type Mailbox ¶
type Mailbox struct {
Host string
TLS bool
IgnoreCertErrors bool
User string
Pwd string
Folder string
// Read only mode, false (original logic) if not initialized
ReadOnly bool
}
Mailbox holds onto the credentials and other information needed for connecting to an IMAP server.
func (*Mailbox) DeleteEmails ¶
DeleteEmails will delete emails from the supplied slice of SeqNums
func (*Mailbox) GetUnread ¶
GetUnread will find all unread emails in the folder and return them as a list.
func (*Mailbox) MarkAsUnread ¶
MarkAsUnread will set the UNSEEN flag on a supplied slice of SeqNums
Click to show internal directories.
Click to hide internal directories.