mailer

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost        = "0.0.0.0"
	DefaultPort        = 25
	DefaultUsername    = ""
	DefaultAppPassword = ""
	DefaultTLS         = false

	DefaultSubject = "From Gogetter Mail Module"
	DefaultBody    = "This is an email from Gogetter Mail Module."
	DefaultFrom    = "[email protected]"
	DefaultTo      = "[email protected]"
)

Variables

This section is empty.

Functions

func InitiateModule

func InitiateModule(scope string) fx.Option

Types

type Config

type Config struct {
	Host        string
	Port        int
	Username    string
	AppPassword string //! Important: Use app password, not the account password.
	TLS         bool
}

type Module added in v0.1.8

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

func (*Module) NewMessage added in v0.1.8

func (m *Module) NewMessage() *gomail.Message

func (*Module) PrintDebugLogs added in v0.1.8

func (m *Module) PrintDebugLogs()

func (*Module) Send added in v0.1.8

func (m *Module) Send(msg *gomail.Message) error

func (*Module) SendTestMail added in v0.1.8

func (m *Module) SendTestMail(to, subject, body string) error

func (*Module) SendTransactionalMail added in v0.1.9

func (m *Module) SendTransactionalMail(from string, to string, subject string, body string) error

creates and sends email

func (*Module) TestSMTPConnection added in v0.1.8

func (m *Module) TestSMTPConnection() error

type Params

type Params struct {
	fx.In

	Lifecycle fx.Lifecycle
	Logger    *zap.Logger
}

Jump to

Keyboard shortcuts

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