notifiers

package
v0.0.0-...-795e254 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SMTPPort is the constant port for SMTP
	SMTPPort = 587
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MailNotifier

type MailNotifier struct {
	Account     string
	Password    string
	Destination string
	// contains filtered or unexported fields
}

MailNotifier is implement simple email notify

func NewGmailNotify

func NewGmailNotify(account, password, destination string, loggy loggy.Loggy) *MailNotifier

NewGmailNotify create new email notify use gmail server

func (*MailNotifier) Notify

func (mn *MailNotifier) Notify(subject string, log <-chan string)

Notify send email

type SimpleMailNotifier

type SimpleMailNotifier struct {
	SMTPServer  string
	Account     string
	Password    string
	Destination string
}

SimpleMailNotifier provide the sync way Notify

func (*SimpleMailNotifier) Notify

func (smn *SimpleMailNotifier) Notify(subject string, log <-chan string)

Notify implement the Notify for the mail send with sync

Jump to

Keyboard shortcuts

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