mail

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultSender

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

func (DefaultSender) SendMail

func (s DefaultSender) SendMail(mail Mail) error

type Mail

type Mail struct {
	To            []string `json:"to"`
	Cc            []string `json:"cc"`
	Bcc           []string `json:"bcc"`
	Subject       string   `json:"subject"`
	Content       string   `json:"body"`
	AttachedFiles []string `json:"attachedFiles"`
}

type Mailer

type Mailer interface {
	SendMail(mail Mail) error
}

func NewDefaultSender

func NewDefaultSender(cfg SmtpConfig) Mailer

type SmtpConfig

type SmtpConfig struct {
	Username    string
	Password    string
	FromName    string
	FromAddress string
	Host        string
	Port        int
}

Jump to

Keyboard shortcuts

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