mail

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailSender

type EmailSender interface {
	Send(to []string, body []byte) error
}

EmailSender declares a method which transmits an email.

type MailHook

type MailHook struct {
	AppName  string
	Address  string
	From     string
	To       string
	Username string
	Password string
	// contains filtered or unexported fields
}

MailHook to sends logs by email with authentication.

func New

func New(appname, address, sender, receiver, username, password string) *MailHook

NewMailHook creates a MailHook and configures it from parameters.

func (*MailHook) Fire

func (h *MailHook) Fire(entry *logrus.Entry) error

Fire is called when a log event is fired.

func (*MailHook) Levels

func (h *MailHook) Levels() []logrus.Level

Levels returns the available logging levels.

Jump to

Keyboard shortcuts

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