smtp

package
v0.1.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: MIT Imports: 7 Imported by: 76

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled  bool   `toml:"enabled"`
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	Username string `toml:"username"`
	Password string `toml:"password"`
	// Whether to skip TLS verify.
	NoVerify bool `toml:"no-verify"`
	// Whether all alerts should trigger an email.
	Global bool `toml:"global"`
	// From address
	From string `toml:"from"`
	// Default To addresses
	To []string `toml:"to"`
	// Close connection to SMTP server after idle timeout has elapsed
	IdleTimeout toml.Duration `toml:"idle-timeout"`
}

func NewConfig

func NewConfig() Config

type Service

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

func NewService

func NewService(c Config, l *log.Logger) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Global

func (s *Service) Global() bool

func (*Service) Open

func (s *Service) Open() error

func (*Service) SendMail

func (s *Service) SendMail(to []string, subject, msg string)

Jump to

Keyboard shortcuts

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