Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶ added in v0.1.2
type Filter struct { SendTime time.Time // if not zero, filter mails received after this time. From string // if not empty, filter emails FROM equal to this value. FromRegexp *regexp.Regexp // if not nil, filter emails FROM matching this regular expression. Subject string // is not empty, filter emails SUBJECT equal to this value. SubjectRegexp *regexp.Regexp // if not nil, filter emails SUBJECT matching this regular expression. }
Filter options to filter emails.
type Header ¶
type Header struct { Address string `json:"address"` ID string `json:"id"` From string `json:"from"` To []string `json:"to"` Subject string `json:"subject"` Date time.Time `json:"date"` Size int64 `json:"size"` Seen bool `json:"seen"` }
Header is the header of a mail.
type Mailer ¶
type Mailer interface { // List returns a list of message headers for the requested address. List(ctx context.Context, address string) ([]*Header, error) // Get returns the message body by a address name and message ID. Get(ctx context.Context, address string, id string) (*Body, error) // Del deletes a single message given the address name and message ID. Del(ctx context.Context, address string, id string) error // Clear deletes all messages in the given address. Clear(ctx context.Context, address string) error // Domain returns the domain of the mailer. Domain() string }
Mailer is a mail client to send and get mails.
Click to show internal directories.
Click to hide internal directories.