smtp

package
v0.0.0-...-739c5f9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(w io.Writer, headers Headers, tmpl *template.Template, data any) error

Types

type Config

type Config struct {
	Host      string
	Port      string
	Name      string
	Username  string
	Password  string
	From      string
	ErrorLog  *log.Logger
	TLSConfig *tls.Config
}

type Headers

type Headers struct {
	From string
	To   string
	Date time.Time
}

type Service

type Service interface {
	Ping() error
	Send(to string, tmpl *template.Template, data any)
	Close()
}

func NewService

func NewService(cfg *Config) Service

Jump to

Keyboard shortcuts

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