smtp

package
v0.1.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Red   string = "#e20b0b"
	Green string = "#23ba47"
	Grey  string = "#a4a8b1"
	Text  string = "text"
)

Variables

This section is empty.

Functions

func Init

func Init(fields map[string]interface{}) error

func Notify

func Notify(log utils.LogLine) error

func Send

func Send(payload Payload) error

Types

type Payload

type Payload struct {
	From    string
	To      string
	Subject string
	Body    string
	Mime    string
	Date    string
}

Payload

func NewPayload

func NewPayload(log utils.LogLine) (Payload, error)

type Settings

type Settings struct {
	HostPort string `field:"host_port"`
	User     string `field:"user"`
	Password string `field:"password"`
	From     string `field:"from"`
	To       string `field:"to"`
	Format   string `field:"format" default:"html"`
	TLS      bool   `field:"tls" default:"false"`
}

Jump to

Keyboard shortcuts

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