smtp

package module
v0.0.0-...-4e3dd66 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 License: MIT Imports: 7 Imported by: 1

README

GoDoc

Documentation

Overview

Package smtp is a barebones, pure Go SMTP server.

The server supports UTF8 and chunked e-mails.

Index

Constants

View Source
const MaxLineLength = SizeLimit

MaxLineLength is the maximum length of a SMTP protocol line. Currently, package smtp does not support long lines.

View Source
const SizeLimit = 32 * 1024

SizeLimit is the maximum e-mail in bytes. Currently, package smtp does not support large e-mails.

Variables

This section is empty.

Functions

func Serve

func Serve(domain string, listener net.Listener, handler Handler) error

Serve runs an SMTP server. Prints domain on connection. Returns an error if the listener fails.

Types

type Handler

type Handler func(*Mail)

A Handler processes received e-mails. Should be thread-safe.

type Mail

type Mail struct {
	From, To string
	Mail     string
}

A Mail holds a received e-mail. From and To are SMTP protocol-level fields (and not parsed from the e-mail headers).

Jump to

Keyboard shortcuts

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