smtp

package
v0.3.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name        string = "smtp"
	Description string = "Send an email with SMTP"
	Permissions string = ""
	Example     string = `` /* 201-byte string literal not displayed */

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

Variables

This section is empty.

Functions

func Send

func Send(payload Payload) error

Types

type Notifier

type Notifier struct{}

func Register

func Register() *Notifier

func (Notifier) Information

func (n Notifier) Information() models.Information

func (Notifier) Init

func (n Notifier) Init(fields map[string]any) error

func (Notifier) Parameters

func (n Notifier) Parameters() models.Parameters

func (Notifier) Run

func (n Notifier) Run(log utils.LogLine) error

type Parameters

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

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)

Jump to

Keyboard shortcuts

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