email

package
v1.81.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSubjectIncident = "[{{ .TitleSite }} {{ .Incident.State | textIncidentState | title }} Incident] {{ .IncidentTitle | title }}"
	DefaultTxtIncident     = `` /* 508-byte string literal not displayed */

	DefaultTxtScheduled = `` /* 586-byte string literal not displayed */

	DefaultSubjectScheduled = "" /* 157-byte string literal not displayed */
	DefaultFrom             = "no-reply@local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

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

func (Email) Creator

func (n Email) Creator(params map[string]interface{}, baseInfo config.BaseInfo) (notifiers.Notifier, error)

func (Email) Description added in v1.6.1

func (n Email) Description() string

func (Email) Id

func (n Email) Id() string

func (Email) Name

func (n Email) Name() string

func (Email) Notify

func (n Email) Notify(notifyReq *models.NotifyRequest) error

func (*Email) SetDialer

func (n *Email) SetDialer(dialer EmailDialer)

type EmailDialer

type EmailDialer interface {
	DialAndSend(m ...*gomail.Message) error
}

type OptsEmail

type OptsEmail struct {
	Host             string   `mapstructure:"host"`
	Port             int      `mapstructure:"port"`
	Username         string   `mapstructure:"username"`
	Password         string   `mapstructure:"password"`
	UseSSl           bool     `mapstructure:"use_ssl"`
	SubjectIncident  string   `mapstructure:"subject_incident"`
	TxtIncident      string   `mapstructure:"txt_incident"`
	SubjectScheduled string   `mapstructure:"subject_scheduled"`
	TxtScheduled     string   `mapstructure:"txt_scheduled"`
	Subscribers      []string `mapstructure:"subscribers"`
	From             string   `mapstructure:"from"`
	SkipInsecure     bool     `mapstructure:"insecure_skip_verify"`
}

type SmtpInfo

type SmtpInfo struct {
	User     string
	Password string
	Host     string
	Port     int
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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