Make IMAP and SMTP sessions check for passwords
This commit is contained in:
@@ -5,12 +5,14 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
"ur.gs/crockery/internal/store"
|
||||
)
|
||||
|
||||
// type Session implements the User interface for emersion/go-smtp
|
||||
type Session struct {
|
||||
ID uint64
|
||||
AccountName string
|
||||
Account *store.Account
|
||||
ServiceName string
|
||||
}
|
||||
|
||||
@@ -20,13 +22,13 @@ func (s *Session) Send(from string, to []string, r io.Reader) error {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("%s session %d for %s: from=%s, to=%s, r=<<EOF\n%s\nEOF", s.ServiceName, s.ID, s.AccountName, from, to, string(data))
|
||||
log.Printf("%s session %d for %s: from=%s, to=%s, r=<<EOF\n%s\nEOF", s.ServiceName, s.ID, s.Account.Username, from, to, string(data))
|
||||
|
||||
return fmt.Errorf("Not yet implemented")
|
||||
}
|
||||
|
||||
func (s *Session) Logout() error {
|
||||
log.Printf("Ending %s session %d for %s", s.ServiceName, s.ID, s.AccountName)
|
||||
log.Printf("Ending %s session %d for %s", s.ServiceName, s.ID, s.Account.Username)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user