smtplog

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPWriter

type SMTPWriter struct {
	log.LogFilter
	log.LogFormatter
	log.SubFormatter

	Host     string
	Port     int
	Insecure bool
	Username string
	Password string
	From     string
	Tos      []string
	Ccs      []string
	Timeout  time.Duration
	// contains filtered or unexported fields
}

SMTPWriter implements log Writer Interface and send log message.

func (*SMTPWriter) Close

func (sw *SMTPWriter) Close()

Close close the mail sender

func (*SMTPWriter) Flush

func (sw *SMTPWriter) Flush()

Flush implementing method. empty.

func (*SMTPWriter) SetCc

func (sw *SMTPWriter) SetCc(s string)

SetCc set Cc recipients

func (*SMTPWriter) SetTimeout

func (sw *SMTPWriter) SetTimeout(timeout string) error

SetTimeout set timeout

func (*SMTPWriter) SetTo

func (sw *SMTPWriter) SetTo(s string)

SetTo set To recipients

func (*SMTPWriter) Write

func (sw *SMTPWriter) Write(le *log.Event) (err error)

Write send log message to smtp server.

Jump to

Keyboard shortcuts

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