Gut the Session interface

This commit is contained in:
2018-03-08 00:17:44 +00:00
parent 1d0fdec642
commit 442ca833ea
5 changed files with 30 additions and 49 deletions

View File

@@ -3,19 +3,17 @@ package smtp
import (
"fmt"
"io"
"ur.gs/crockery/internal/store"
)
type Sender struct{}
func (s *Sender) Name() string {
return "submission-starttls"
// Submission requires the sender to be logged in, so this struct tracks the
// logged-in account per-session
type sender struct {
msa *msa
account *store.Account
}
// We're looking for the email to be from a logged-in account, to anywhere
// on the internet - including locally!
//
// Should we handle local delivery differently to remote delivery, or connect
// to ourselves, i.e., from submission, to smtp?
func (s *Sender) Send(from string, to []string, reader io.Reader) error {
func (s *sender) ServeSMTP(from string, to []string, r io.Reader) error {
return fmt.Errorf("Not yet implemented")
}