smtp

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerAddress string `json:"serverAddress,omitempty"`
	TLSPort       int32  `json:"TLSPort,omitempty"`
	SSLPort       int32  `json:"SSLPort,omitempty"`
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	FromEmail     string `json:"fromEmail,omitempty"`
	CreatedAt     string `json:"createdAt,omitempty"`
	UpdatedAt     string `json:"updatedAt,omitempty"`
}

type ConfigStore

type ConfigStore interface {
	IsNotFoundError(error) bool
	UpsertSMTPConfig(interface{}) error
	GetSMTPConfig(interface{}) error
}

type Mailer

type Mailer struct {
	errors.NotFoundErrCheck
	// contains filtered or unexported fields
}

func New

func New(cs ConfigStore) (*Mailer, error)

func (*Mailer) Configured

func (m *Mailer) Configured() error

func (*Mailer) SendEmail

func (m *Mailer) SendEmail(email model.SendMail) error

func (*Mailer) SetConfig

func (m *Mailer) SetConfig(conf Config, notifEmail model.SendMail) error

Jump to

Keyboard shortcuts

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