smtp

package
v0.0.0-...-60f5d5a Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MimeHTML - Content type
	MimeHTML = "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Host string
}

type FakeSMTP

type FakeSMTP struct {
	SMTP
}

FakeSMTP -

func NewFakeSMTP

func NewFakeSMTP(l logger.Logger, c Configuration) (*FakeSMTP, error)

NewFakeSMTP -

func (*FakeSMTP) Connect

func (e *FakeSMTP) Connect() error

Connect -

func (*FakeSMTP) Init

func (e *FakeSMTP) Init() error

Init -

func (*FakeSMTP) Quit

func (e *FakeSMTP) Quit() error

Quit the connection

func (*FakeSMTP) SendEmail

func (e *FakeSMTP) SendEmail(from, to, subject, content string) error

SendEmail -

func (*FakeSMTP) SendHTMLEmail

func (e *FakeSMTP) SendHTMLEmail(from, to, subject, content string) error

SendHTMLEmail -

func (*FakeSMTP) SendRawEmail

func (e *FakeSMTP) SendRawEmail(from string, to string, content bytes.Buffer) error

SendRawEmail - Support attachment

type SMTP

type SMTP struct {
	// contains filtered or unexported fields
}

SMTP -

func NewSMTP

func NewSMTP(l logger.Logger, c Configuration) (*SMTP, error)

NewSMTP -

func (*SMTP) Connect

func (e *SMTP) Connect() error

Connect -

func (*SMTP) Init

func (e *SMTP) Init() error

Init -

func (*SMTP) Quit

func (e *SMTP) Quit() error

Quit the connection

func (*SMTP) SendEmail

func (e *SMTP) SendEmail(from, to, subject, content string) error

SendEmail -

func (*SMTP) SendHTMLEmail

func (e *SMTP) SendHTMLEmail(from, to, subject, content string) error

SendHTMLEmail -

func (*SMTP) SendRawEmail

func (e *SMTP) SendRawEmail(from string, to string, content bytes.Buffer) error

SendRawEmail - Support attachment

Jump to

Keyboard shortcuts

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