smtp

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClient = &TextProtoSmtp{}
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Connect(*Command) error
	Close() error
	Cmd(string) (int, time.Duration, error)
}

type Command

type Command struct {
	Addr    string
	Port    uint16
	Timeout time.Duration

	Send                 string // typically a "HELO" or "EHLO" command
	ExpectedResponseCode int    // typically 250

	WarnRespTimeThreshold time.Duration
	CritRespTimeThreshold time.Duration
	// contains filtered or unexported fields
}

func (*Command) Run

func (c *Command) Run(*check.Check) (result *check.Result, err error)

func (*Command) SetClient

func (c *Command) SetClient(client Client)

type NotReadyErr

type NotReadyErr struct {
	Cause error
}

func (*NotReadyErr) Error

func (e *NotReadyErr) Error() string

func (*NotReadyErr) Unwrap

func (e *NotReadyErr) Unwrap() error

type TextProtoSmtp

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

func (*TextProtoSmtp) Close

func (t *TextProtoSmtp) Close() error

func (*TextProtoSmtp) Cmd

func (t *TextProtoSmtp) Cmd(s string) (int, time.Duration, error)

func (*TextProtoSmtp) Connect

func (t *TextProtoSmtp) Connect(c *Command) error

Jump to

Keyboard shortcuts

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