relay

package
v0.0.0-...-5cfdc92 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionPlain    = "plain"
	ConnectionStartTLS = "starttls"
	ConnectionTLS      = "tls"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OutgoingServer

type OutgoingServer struct {
	AuthMethod     config.RelayAuthMethod
	ConnectionType config.RelayConnectionType
	FromEmail      string
	Host           string
	Password       string
	Port           int
	Username       string
	VerifyTLS      bool
}

func NewOutgoingServer

func NewOutgoingServer(conf config.RelayOutgoingServer) (*OutgoingServer, error)

func (*OutgoingServer) Send

func (ros *OutgoingServer) Send(from string, recipients []string, message []byte) error

type Relay

type Relay struct {
	OutgoingServer *OutgoingServer
}

func NewRelay

func NewRelay(conf config.Relay) (*Relay, error)

func (*Relay) Handle

func (r *Relay) Handle(from string, recipients []string, message []byte) error

Jump to

Keyboard shortcuts

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