gosmtpmx

package module
v0.0.0-...-656cc40 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2014 License: BSD-3-Clause Imports: 6 Imported by: 0

README

gosmtpmx Build Status

A SMTP sender library utilizing MX RR instead of address written in Go.

under development

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(mx MX) *client

Types

type MX

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

type MXlist

type MXlist map[uint16]*[]*net.MX

func NewImplicitMXList

func NewImplicitMXList(name string) MXlist

func NewMXList

func NewMXList(rrs []*net.MX) MXlist

NewMXList returns MXlist that groups []*net.MX by preference.

func (*MXlist) Prefs

func (list *MXlist) Prefs() []uint16

Prefs returns sorted preferences

func (*MXlist) Shuffle

func (list *MXlist) Shuffle()

Shuffle shuffles MX RR between same preference in MXlist

type Resolver

type Resolver interface {
	ResolvIP(host string) ([]net.IP, error)
	ResolvMX(host string) ([]*net.MX, error)
	NoSuchHost(err error) (bool, string)
}

Resolver implements DNS lookup functions

type Sender

type Sender interface {
	SendMail(addr, from string, to []string, msg []byte) error
}

func NewSender

func NewSender(mx MX) Sender

Jump to

Keyboard shortcuts

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