Documentation ¶
Index ¶
- Constants
- type Connection
- func (conn *Connection) Connect() error
- func (conn *Connection) CreateMailbox(name string) error
- func (conn *Connection) DeleteMailbox(name string) error
- func (conn *Connection) DeleteMsgs(mailbox string, uids []uint32, expunge bool) error
- func (conn *Connection) Disconnect() error
- func (conn *Connection) Fetch(mailbox string, uids []uint32) ([]*Message, error)
- func (conn *Connection) GetFlags(mailbox string, uid uint32) ([]string, error)
- func (conn *Connection) List() (map[string]imapUtil.MailboxInfo, error)
- func (conn *Connection) Move(uids []uint32, from string, to string) error
- func (conn *Connection) Search(mailbox string, withFlags []string, withoutFlags []string) ([]uint32, error)
- func (conn *Connection) SearchAndFetch(mailbox string, withFlags []string, withoutFlags []string) ([]*Message, error)
- func (conn *Connection) Select(mailbox string, readOnly bool, autoCreate bool) (*imapUtil.MailboxStatus, error)
- func (conn *Connection) SetFlags(mailbox string, uids []uint32, flagOp string, flags []interface{}, ...) error
- func (conn *Connection) Upload(file string, mailbox string, flags []string) error
- type Message
- type MessageHeaders
- type RawMessage
Constants ¶
View Source
const ( SeenFlag = "\\Seen" AnsweredFlag = "\\Answered" FlaggedFlag = "\\Flagged" DeletedFlag = "\\Deleted" DraftFlag = "\\Draft" RecentFlag = "\\Recent" )
System message flags, defined in RFC 3501 section 2.3.2.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Server string `yaml:"server"` Port int `yaml:"port"` Username string `yaml:"username"` Password string `yaml:"password"` IMAPS bool `yaml:"imaps"` Starttls *bool `yaml:"starttls"` TLSVerify *bool `yaml:"tlsverify"` TLSCACertFile string `yaml:"cacertfile"` // contains filtered or unexported fields }
func (*Connection) Connect ¶
func (conn *Connection) Connect() error
Manually connect to the IMAP server. Usually the session to the IMAP server is re-established automatically if we're disconnected or logged out.
func (*Connection) CreateMailbox ¶
func (conn *Connection) CreateMailbox(name string) error
func (*Connection) DeleteMailbox ¶
func (conn *Connection) DeleteMailbox(name string) error
func (*Connection) DeleteMsgs ¶
func (conn *Connection) DeleteMsgs(mailbox string, uids []uint32, expunge bool) error
func (*Connection) Disconnect ¶
func (conn *Connection) Disconnect() error
func (*Connection) Fetch ¶
func (conn *Connection) Fetch(mailbox string, uids []uint32) ([]*Message, error)
func (*Connection) GetFlags ¶
func (conn *Connection) GetFlags(mailbox string, uid uint32) ([]string, error)
func (*Connection) List ¶
func (conn *Connection) List() (map[string]imapUtil.MailboxInfo, error)
List mailboxes
func (*Connection) SearchAndFetch ¶
func (*Connection) Select ¶
func (conn *Connection) Select(mailbox string, readOnly bool, autoCreate bool) (*imapUtil.MailboxStatus, error)
type Message ¶
type Message struct { RawMessage imapUtil.Message Headers MessageHeaders }
func NewMessage ¶
func NewMessage(rawMail *imapUtil.Message, headers MessageHeaders) *Message
type MessageHeaders ¶
type MessageHeaders map[string]interface{}
type RawMessage ¶
Click to show internal directories.
Click to hide internal directories.