handlers

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handle is a handler that will be called by the SMTP server with the given SMTP state.
	Handle(state *smtp.State) error
}

Handler is an interface for SMTP handlers.

type HandlerMachanism

type HandlerMachanism struct {
	Handlers []Handler
}

HandlerMechanism contains a list of all handlers and executes the chain it is meant to be passed to the MTA as mta.Handler interface

func (*HandlerMachanism) AddHandler

func (h *HandlerMachanism) AddHandler(handler ...Handler)

AddHandler adds a handler to the mechanism.

func (*HandlerMachanism) Handle

func (h *HandlerMachanism) Handle(state *smtp.State) error

Handle implements the Handler interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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