smtp

package
v0.0.0-...-afc8e46 Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn net.Conn, host string) (*smtp.Client, error)

create a new smtp client wrapper function

func Serve

func Serve(l net.Listener, h Handler, appname, hostname string) (err error)

serve smtp via a net.Listener

Types

type Handler

type Handler func(remoteAddr net.Addr, from string, to []string, body []byte)

smtp message handler

type Server

type Server struct {
	// name name of the smtp application
	Appname string
	// the hostname of the smtp server
	Hostname string
	// the handler of inbound mail
	Handler Handler
}

func (*Server) Serve

func (s *Server) Serve(l net.Listener) (err error)

serve creates a new smtp sesion after a network connection is established

Jump to

Keyboard shortcuts

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