courier

package
v0.0.0-...-bb97991 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package courier implements various couriers for delivering messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Courier

type Courier interface {
	// Deliver mail to a recipient. Return the error (if any), and whether it
	// is permanent (true) or transient (false).
	Deliver(from string, to string, data []byte) (error, bool)
}

Courier delivers mail to a single recipient. It is implemented by different couriers, for both local and remote recipients.

type Procmail

type Procmail struct {
	Binary  string        // Path to the binary.
	Args    []string      // Arguments to pass.
	Timeout time.Duration // Timeout for each invocation.
}

Procmail delivers local mail by executing a local binary, like procmail or maildrop. It is named after procmail just for reference, it works with any binary that:

  • Receives the email to deliver via stdin.
  • Exits with code EX_TEMPFAIL (75) for transient issues.

func (*Procmail) Deliver

func (p *Procmail) Deliver(from string, to string, data []byte) (error, bool)

Deliver an email. On failures, returns an error, and whether or not it is permanent.

type SMTP

type SMTP struct {
	Dinfo    *domaininfo.DB
	STSCache *sts.PolicyCache
}

SMTP delivers remote mail via outgoing SMTP.

func (*SMTP) Deliver

func (s *SMTP) Deliver(from string, to string, data []byte) (error, bool)

Deliver an email. On failures, returns an error, and whether or not it is permanent.

Jump to

Keyboard shortcuts

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