smtp

package
v0.0.0-...-b03fc3e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEmail

func SendEmail(c Config, subject string, body string) error

SendEmail Sends Email

Types

type Config

type Config struct {
	Enabled  bool   `toml:"enabled" override:"enabled"`
	Host     string `toml:"host" override:"host"`
	Port     int    `toml:"port" override:"port"`
	Username string `toml:"username" override:"username"`
	Password string `toml:"password" override:"password,redact"`
	// Whether to skip TLS verify.
	InsecureSkipVerify bool `toml:"insecure-skip-verify" override:"insecure-skip-verify"`
	// From address
	From string `toml:"from" override:"from"`
	// Default To addresses
	To []string `toml:"to" override:"to"`
}

Config configuration data

func (Config) Validate

func (c Config) Validate() error

Validate basic validations

Jump to

Keyboard shortcuts

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