backendutil

package
v0.102.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package backendutil provide utilities to implement SMTP backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransformBackend

type TransformBackend struct {
	Backend smtp.Backend

	TransformMail func(from string) (string, error)
	TransformRcpt func(to string) (string, error)
	TransformData func(r io.Reader) (io.Reader, error)
}

TransformBackend is a backend that transforms messages.

func (*TransformBackend) AnonymousLogin

func (be *TransformBackend) AnonymousLogin(state *smtp.ConnectionState) (smtp.Session, error)

AnonymousLogin implements the smtp.Backend interface.

func (*TransformBackend) Login

func (be *TransformBackend) Login(state *smtp.ConnectionState, username, password string) (smtp.Session, error)

Login implements the smtp.Backend interface.

Jump to

Keyboard shortcuts

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