Help us shape the future of Go! Take the 2026 Go Developer Survey

email

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotifyAlways      = "always" // always send email notification
	NotifyNever       = "never"  // never send email notifications
	NotifyAuthor      = "author" // only send email notifications to the author
	NotifyAfterChange = "change" // only if the previous commit has a different status

	NotifyTrue  = "true"  // alias for NotifyTrue
	NotifyFalse = "false" // alias for NotifyFalse
	NotifyOn    = "on"    // alias for NotifyTrue
	NotifyOff   = "off"   // alias for NotifyFalse
	NotifyBlame = "blame" // alias for NotifyAuthor
)
View Source
const (
	Subject = "[%s] %s/%s (%s - %s)"
)

Variables

View Source
var (
	DefaultHost = config.String("smtp-host", "")
	DefaultPort = config.String("smtp-port", "")
	DefaultFrom = config.String("smtp-from", "")
	DefaultUser = config.String("smtp-user", "")
	DefaultPass = config.String("smtp-pass", "")
)

Functions

This section is empty.

Types

type Email

type Email struct {
	Recipients []string `yaml:"recipients"`
	Success    string   `yaml:"on_success"`
	Failure    string   `yaml:"on_failure"`

	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	From     string `yaml:"from"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

func (*Email) Send

func (e *Email) Send(context *model.Request) error

Send will send an email, either success or failure, based on the Commit Status.

Jump to

Keyboard shortcuts

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