Documentation ¶
Index ¶
- func DefaultHandler(_ context.Context, c *client.Client, update client.Update) error
- type Addr
- type Client
- type Config
- type Mail
- type MailBuilder
- func (mb *MailBuilder) AuthPlain(username, password string) error
- func (mb *MailBuilder) Data(r io.Reader) (err error)
- func (mb *MailBuilder) Logout() error
- func (mb *MailBuilder) Mail(from string, opts *smtp.MailOptions) error
- func (mb *MailBuilder) Rcpt(to string) error
- func (mb *MailBuilder) Reset()
- type SMTPReciever
- type UpdateHandlerClosure
- type UpdateHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
func NewIMAPClient ¶
func (*Client) ListenForUpdates ¶
func (*Client) Use ¶
func (c *Client) Use(handler UpdateHandlerClosure)
type Config ¶
func LoadConfig ¶
type Mail ¶
func (*Mail) HumanHeader ¶
type MailBuilder ¶
type MailBuilder struct { Backend *SMTPReciever // contains filtered or unexported fields }
A MailBuilder (implements smtp.Session) is returned after EHLO.
func (*MailBuilder) AuthPlain ¶
func (mb *MailBuilder) AuthPlain(username, password string) error
func (*MailBuilder) Logout ¶
func (mb *MailBuilder) Logout() error
func (*MailBuilder) Mail ¶
func (mb *MailBuilder) Mail(from string, opts *smtp.MailOptions) error
func (*MailBuilder) Rcpt ¶
func (mb *MailBuilder) Rcpt(to string) error
func (*MailBuilder) Reset ¶
func (mb *MailBuilder) Reset()
type SMTPReciever ¶
type SMTPReciever struct { RcptWhitelist map[string]bool RemoteWhiteList func(net.Addr) bool MailQueue chan<- Mail }
SMTPReciever implements smtp.Backend
func NewSMTPReciever ¶
func (*SMTPReciever) NewSession ¶
func (rcvr *SMTPReciever) NewSession(c smtp.ConnectionState, hostname string) (smtp.Session, error)
type UpdateHandlerClosure ¶
type UpdateHandlerClosure func(UpdateHandlerFunc) UpdateHandlerFunc
type UpdateHandlerFunc ¶
Needs to not block
func PrintAttributeChange ¶
func PrintAttributeChange(next UpdateHandlerFunc) UpdateHandlerFunc
func PrintDeletion ¶
func PrintDeletion(next UpdateHandlerFunc) UpdateHandlerFunc
func PrintNewMail ¶
func PrintNewMail(next UpdateHandlerFunc) UpdateHandlerFunc
Click to show internal directories.
Click to hide internal directories.