Also, introduce the outline of a framework to handle message sending differently to message receipt.
21 lines
442 B
Go
21 lines
442 B
Go
package smtp
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
type Receiver struct{}
|
|
|
|
func (r *Receiver) Name() string {
|
|
return "smtp-starttls"
|
|
}
|
|
|
|
// It seems odd to have a Receiver called Send, but what we're looking for is an
|
|
// attempt from an arbitrary source to send an email to known accounts.
|
|
//
|
|
// We might want to clean this interface
|
|
func (r *Receiver) Send(from string, to []string, reader io.Reader) error {
|
|
return fmt.Errorf("Not yet implemented")
|
|
}
|