relay

package
v0.0.0-...-78c831c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relay

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

Relay is an SMTP handler that forwards the incoming mail to another SMTP relay server.

func New

func New(relayHostname string, relayPort int, relayUsername string, relayPassword string, relayInsecureSkipVerify bool) *Relay

New creates a new Relay handler.

func (*Relay) Handle

func (handler *Relay) Handle(state *smtp.State) error

Handle handles the state.

func (*Relay) SendMail

func (handler *Relay) SendMail(from string, recipients []string, message []byte) error

SendMail sends an SMTP message with a given from and to mail address. code partially copy pasted from the net/smtp package to allow setting a custom TLS config. should be moved to the SMTP package

Jump to

Keyboard shortcuts

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