email

package
v0.0.0-...-0f1ae68 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT, Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Host string
	Port int
}

Address specifies the host address.

func (Address) String

func (a Address) String() string

String composes a valid address in the form "host:port".

type Bucket

type Bucket struct {
	Name  string
	Pairs []Pair
}

Bucket is a named set of kv pairs.

type Buckets

type Buckets []Bucket

Buckets is a list of Buckets.

func (Buckets) Find

func (bs Buckets) Find(name string) *Bucket

Find bucket by name. Nil if not found.

type Client

type Client struct {
	Sender  string
	Auth    smtp.Auth
	Address Address
}

Client sends emails on a sender's behalf.

func NewClientFromGitConfig

func NewClientFromGitConfig() (*Client, error)

NewClientFromGitConfig looks at the default git config to find smtp details.

TODO(jfm) [ux,security]: some people may feel uncomfortable about this, probably a good place to have a consent interface of some kind.

func (Client) Send

func (c Client) Send(msg []byte, to ...string) error

Send an email message to one or more recipients.

type Pair

type Pair struct {
	Key, Value string
}

Pair associates a key with a value.

Jump to

Keyboard shortcuts

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