smtp

package
v0.0.0-...-2eeffc0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: Apache-2.0 Imports: 7 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 {
	Enable   bool
	Host     string
	Port     int
	Username string
	Password string
	From     string
	To       []string
}

type Result

type Result struct {
	Name       string
	CreatedAt  time.Time
	FinishedAt time.Time
	Status     string
	FilePath   string
}

type Service

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

func NewService

func NewService(c Config) Service

func (*Service) IsEnabled

func (s *Service) IsEnabled() bool

IsEnabled checks if the smtp service is enabled from config.Enable

func (*Service) Send

func (s *Service) Send(r Result) error

Send fires a SMTP email message with given configuration

Jump to

Keyboard shortcuts

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