mail

package
v0.0.0-...-6ecc318 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `envconfig:"SMTP_HOST"`
	Port     string `envconfig:"SMTP_PORT"`
	Count    int    `envconfig:"SMTP_COUNT"`
	UserName string `envconfig:"SMTP_USERNAME"`
	Password string `envconfig:"SMTP_PASSWORD"`
}

func LoadConfigFromEnv

func LoadConfigFromEnv() Config

type Email

type Email struct {
	From        string
	To          []string
	Bcc         []string
	Cc          []string
	Subject     string
	Text        []byte // Plaintext message (optional)
	HTML        []byte // Html message (optional)
	Headers     textproto.MIMEHeader
	ReadReceipt []string
}

type Mailer

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

func NewPool

func NewPool() (*Mailer, error)

func (*Mailer) Send

func (m *Mailer) Send(e Email, timeOut time.Duration)

Jump to

Keyboard shortcuts

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