email

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPConfig

type SMTPConfig struct {
	From                 string `split_words:"true"`
	Password             string `split_words:"true"`
	To                   string `split_words:"true"`
	Host                 string `split_words:"true"`
	Port                 int    `split_words:"true" default:"587"`
	Subject              string `split_words:"true" default:"New Form Received"`
	ReplyTo              string `split_words:"true"`
	BodyTemplateFile     string `split_words:"true"`
	BodyHTMLTemplateFile string `split_words:"true"`
}

SMTPConfig defines SMTP configuration.

type SMTPSender

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

func NewSMTPSender

func NewSMTPSender(cfg SMTPConfig) (*SMTPSender, error)

func (*SMTPSender) EmailSender

func (s *SMTPSender) EmailSender() Sender

func (*SMTPSender) Send

func (s *SMTPSender) Send(_ context.Context, values map[string]string, files map[string]*multipart.FileHeader) error

type Sender

type Sender interface {
	Send(ctx context.Context, values map[string]string, files map[string]*multipart.FileHeader) error
}

Jump to

Keyboard shortcuts

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