sendmail

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT Imports: 10 Imported by: 0

README

Send Mail Package

The official documentation of the Send Mail package will be here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDaemon

func NewDaemon(
	authSMTPUser,
	authSMTPPassword,
	authSMTPHost string,
	authSMTPPort int,
	messageQueue chan MessageBox) *daemon

func NewManager

func NewManager(
	from mail.Address) *manager

Types

type Daemon

type Daemon interface {
	Run(ctx context.Context, logger *zap.Logger)
}

type Email

type Email struct {
	To        mail.Address
	From      mail.Address
	Subject   string
	Body      string
	MessageId string
}

type Manager

type Manager interface {
	AddMessageToQueue(messageQueue chan MessageBox, request Request, email Email) error
}

type MessageBox

type MessageBox struct {
	Email   Email
	Request Request
}

type MockDescription added in v0.1.1

type MockDescription struct {
	Props    struct{}
	Expected struct {
		Error error
	}
}
var MockData MockDescription

func (MockDescription) AddMessageToQueue added in v0.1.1

func (manager MockDescription) AddMessageToQueue(_ chan MessageBox, _ Request, _ Email) error

type Request

type Request struct {
	RemoteAddr    string
	RemoteAddrKey string
	RequestId     string
	RequestIdKey  string
}

Jump to

Keyboard shortcuts

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