mail

package
v0.0.0-...-1d74c4b Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements a mail client

func NewClient

func NewClient(config *Config) *Client

NewClient return a new mail

func (*Client) Send

func (c *Client) Send(to, email string, data interface{}) error

Send sends an email message to the provided address and with the provided subject

type Config

type Config struct {
	Identity string            `yaml:"identity"`
	Username string            `yaml:"username"`
	Password string            `yaml:"password"`
	Host     string            `yaml:"host"`
	Addr     string            `yaml:"addr"`
	From     string            `yaml:"from"`
	HTML     bool              `yaml:"html"`
	Subjects map[string]string `yaml:"subjects"`
}

Config represents the mail configuration

Jump to

Keyboard shortcuts

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