email

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Overview

Package email provides email notification support.

Index

Constants

View Source
const ProviderType = "email"

ProviderType defines the type of the email notification provider.

Variables

This section is empty.

Functions

func MergeOptions

func MergeOptions(ctx context.Context, src Options, dst *Options, isUpdate bool) error

MergeOptions updates the destination options with the source options.

Types

type Options

type Options struct {
	SMTPServer   string `json:"smtpServer"`
	SMTPPort     int    `json:"smtpPort"`
	SMTPIdentity string `json:"smtpIdentity"` // usually empty, most servers use username/password
	SMTPUsername string `json:"smtpUsername"`
	SMTPPassword string `json:"smtpPassword"`

	From string `json:"from"`
	To   string `json:"to"`
	CC   string `json:"cc"`

	Format string `json:"format"` // format of the message, must be "html" or "md"
}

Options defines email notification provider options.

func (*Options) ApplyDefaultsAndValidate added in v0.19.0

func (o *Options) ApplyDefaultsAndValidate(ctx context.Context) error

ApplyDefaultsAndValidate applies default values and validates the configuration.

Jump to

Keyboard shortcuts

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