package smtp import ( "bytes" "io" "io/ioutil" "log" "ur.gs/crockery/internal/store" ) type Handler interface { Name() string Send(from string, to []string, r io.Reader) error } // type Session implements the User interface for emersion/go-smtp type Session struct { ID uint64 Account *store.Account Handler Handler } func (s *Session) Send(from string, to []string, r io.Reader) error { // FIXME: TODO: don't keep this lot forever, it's for debugging purposes data, err := ioutil.ReadAll(r) if err != nil { return err } log.Printf("%s session %d for %s: from=%s, to=%s, r=<