smtplog

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 6 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.RetrySupport
	log.FilterSupport
	log.FormatSupport
	log.SubjectSuport

	Host     string
	Port     int
	Insecure bool
	Username string
	Password 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 flush and close the mail sender

func (*SMTPWriter) Flush

func (sw *SMTPWriter) Flush()

Flush retry send failed events.

func (*SMTPWriter) SetCc

func (sw *SMTPWriter) SetCc(s string) error

SetCc set Cc recipients

func (*SMTPWriter) SetFrom added in v1.0.27

func (sw *SMTPWriter) SetFrom(s string) error

SetFrom set From recipient

func (*SMTPWriter) SetTimeout

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

SetTimeout set timeout

func (*SMTPWriter) SetTo

func (sw *SMTPWriter) SetTo(s string) error

SetTo set To recipients

func (*SMTPWriter) Write

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

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