Versions in this module Expand all Collapse all v0 v0.1.0 Oct 5, 2021 Changes in this version + type Backend interface + Cleanup func(deadline time.Time) + GetEmailById func(id int) *EMail + GetEmailsByAlias func(alias string) []*EMail + GetProcessedEmails func() int + IsAcceptedDomain func(email string) bool + SaveEmail func(*EMail) + func NewRedisBackend(addr string, password string, db int, acceptedDomains []string, ...) Backend + type EMail struct + Body []byte + Data []byte + From string + Header mail.Header + ID int + Subject string + Time time.Time + To []string + type InMemoryBackend struct + AcceptSubdomains bool + AcceptedDomains []string + MaxStoredMessage int + func (b *InMemoryBackend) Cleanup(deadline time.Time) + func (b *InMemoryBackend) GetEmailById(id int) *EMail + func (b *InMemoryBackend) GetEmailsByAlias(alias string) []*EMail + func (b *InMemoryBackend) GetProcessedEmails() int + func (b *InMemoryBackend) IsAcceptedDomain(email string) bool + func (b *InMemoryBackend) SaveEmail(email *EMail) + func (backend *InMemoryBackend) AnonymousLogin(c *smtp.ConnectionState) (smtp.Session, error) + func (backend *InMemoryBackend) Login(_ *smtp.ConnectionState, username, password string) (smtp.Session, error) + func (backend *InMemoryBackend) NewSession(c smtp.ConnectionState, _ string) (smtp.Session, error) + type RedisBackend struct + func (b *RedisBackend) Cleanup(deadline time.Time) + func (b *RedisBackend) GetEmailById(id int) *EMail + func (b *RedisBackend) GetEmailsByAlias(alias string) []*EMail + func (b *RedisBackend) GetProcessedEmails() int + func (b *RedisBackend) IsAcceptedDomain(email string) bool + func (b *RedisBackend) SaveEmail(email *EMail) + func (backend *RedisBackend) AnonymousLogin(c *smtp.ConnectionState) (smtp.Session, error) + func (backend *RedisBackend) Login(_ *smtp.ConnectionState, username, password string) (smtp.Session, error) + func (backend *RedisBackend) NewSession(c smtp.ConnectionState, _ string) (smtp.Session, error) + type Session struct + func (s *Session) AuthPlain(username, password string) error + func (s *Session) Data(r io.Reader) error + func (s *Session) Logout() error + func (s *Session) Mail(from string, opts smtp.MailOptions) error + func (s *Session) Rcpt(to string) error + func (s *Session) Reset()