mailer

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockDialer

func NewMockDialer() *mocks.Dialer

Types

type Config

type Config struct {
	SMTPHost     string            `yaml:"smtp_host" mapstructure:"smtp_host"`
	SMTPPort     int               `yaml:"smtp_port" mapstructure:"smtp_port"`
	SMTPUsername string            `yaml:"smtp_username" mapstructure:"smtp_username"`
	SMTPPassword string            `yaml:"smtp_password" mapstructure:"smtp_password"`
	SMTPInsecure bool              `yaml:"smtp_insecure" mapstructure:"smtp_insecure" default:"true"`
	Headers      map[string]string `yaml:"headers" mapstructure:"headers"`
}

type Dialer

type Dialer interface {
	DialAndSend(m *mail.Message) error
	FromHeader() string
}

type DialerImpl

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

func NewDialerImpl

func NewDialerImpl(SMTPHost string, SMTPPort int, SMTPUser string, SMTPPass string,
	SMTPInsecure bool, headers map[string]string) *DialerImpl

func (DialerImpl) DialAndSend

func (m DialerImpl) DialAndSend(msg *mail.Message) error

func (DialerImpl) FromHeader

func (m DialerImpl) FromHeader() string

FromHeader returns the headers to be added to the mail as from field

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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