package email

import "time"

// WithDial sets the connection seam for a test. It lives in a _test.go file so
// the seam has no linker symbol in the shipped binary: no code outside this
// package can hand FetchSince a dialer, and therefore no code outside this
// package can point the mail reader at a cleartext transport and give it his
// password. The compiler is what enforces that, which is the whole reason the
// field is unexported.
func (f FetchSince) WithDial(d func(addr string, timeout time.Duration) (*Conn, error)) FetchSince {
	f.dial = d
	return f
}
