mail

package
v0.0.0-...-9bd82c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHistogramByBucket

func CreateHistogramByBucket(latencies []time.Duration, bucketCount int)

func CreateHistogramByDuration

func CreateHistogramByDuration(latencies []time.Duration, bucketSize time.Duration)

func GetLatencies

func GetLatencies(p string, w io.Writer) error

func HasFlexedPrefix

func HasFlexedPrefix(s, prefix string) bool

HasPrefix with Case-Insensitive

func HashID

func HashID() string

func IsMailText

func IsMailText(p string) bool

func OptimisticUID

func OptimisticUID() (string, error)

func ReadFirstBytes

func ReadFirstBytes(p string, bytes int) ([]byte, error)

Types

type Bulk

type Bulk struct {
	Addr       string `map:"addr" validate:"required"`
	From       string `map:"from" validate:"required"`
	To         string `map:"to" validate:"required"`
	Subject    string `map:"subject"`
	MyHostname string `map:"myhostname"`
	Session    int    `map:"session"`
	Message    int    `map:"message"`
	Length     int    `map:"length"`
	// contains filtered or unexported fields
}

func NewBulk

func NewBulk(p probe.ActionsParams) (*Bulk, error)

func (*Bulk) Deliver

func (b *Bulk) Deliver()

func (*Bulk) Send

func (b *Bulk) Send(wg *sync.WaitGroup) error

type Client

type Client struct {
	Text *textproto.Conn
	// contains filtered or unexported fields
}

func Dial

func Dial(addr string) (*Client, error)

func NewClient

func NewClient(conn net.Conn, host string) (*Client, error)

func (*Client) Auth

func (c *Client) Auth(a smtp.Auth) error

func (*Client) Close

func (c *Client) Close() error

func (*Client) Data

func (c *Client) Data() (io.WriteCloser, error)

func (*Client) Extension

func (c *Client) Extension(ext string) (bool, string)

func (*Client) Hello

func (c *Client) Hello(localName string) error

func (*Client) Mail

func (c *Client) Mail(from string) error

func (*Client) Noop

func (c *Client) Noop() error

func (*Client) Quit

func (c *Client) Quit() error

func (*Client) Rcpt

func (c *Client) Rcpt(to string) error

func (*Client) Reset

func (c *Client) Reset() error

func (*Client) StartTLS

func (c *Client) StartTLS(config *tls.Config) error

func (*Client) TLSConnectionState

func (c *Client) TLSConnectionState() (state tls.ConnectionState, ok bool)

func (*Client) Verify

func (c *Client) Verify(addr string) error

type Latencies

type Latencies struct {
	EarliestTime time.Time
	Data         []Latency
	MailDir      string
	TimeFormat   string
	TimeLocation *time.Location
}

func (*Latencies) FindEarliestSentTime

func (l *Latencies) FindEarliestSentTime() (time.Time, error)

func (*Latencies) Make

func (l *Latencies) Make() error

func (*Latencies) ParseMail

func (l *Latencies) ParseMail(p string) error

type Latency

type Latency struct {
	ElapsedTimeToSent     time.Duration
	ElapsedTimeToReceived time.Duration
	SentTime              time.Time
	LastReceivedTime      time.Time
	EndToEnd              time.Duration
	FirstReceivedTime     time.Time
	Relay                 time.Duration
	ReturnPath            string
	FilePath              string
}

type Mail

type Mail struct {
	Addr             string
	MailFrom         string
	RcptTo           []string
	Data             []byte
	Auth             smtp.Auth
	StartTLSDisabled bool
	MessageCount     int
}

func (*Mail) Send

func (m *Mail) Send() error

type MockServer

type MockServer struct {
	Addr string
	Name string
	Log  *log.Logger
	*TLS
}

func (*MockServer) Serve

func (s *MockServer) Serve() error

type MockServerSession

type MockServerSession struct {
	// contains filtered or unexported fields
}

type TLS

type TLS struct {
	CertPath string
	KeyPath  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL