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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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