smtp

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 5 Imported by: 10

Documentation

Index

Constants

View Source
const (
	ProviderGoMail = Provider("gomail")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username string
	Password string
	Host     string
	Port     int64
	Provider Provider
}

func (*Config) Default added in v0.0.26

func (c *Config) Default()

type Interface added in v0.0.26

type Interface interface {
	Send(ctx context.Context, msgs ...Message) error
}

func Init added in v0.0.26

func Init(cfg Config) (Interface, error)

func InitGoMail

func InitGoMail(cfg Config) Interface

type Message added in v0.0.26

type Message struct {
	Headers MessageHeaders
	Body    MessageBody
}

type MessageBody added in v0.0.26

type MessageBody struct {
	ContentType string
	Template    string
	Values      map[string]any
}

type MessageHeaders added in v0.0.26

type MessageHeaders struct {
	From    []string
	To      []string
	Subject []string
	Extras  map[string][]string
}

type Provider added in v0.0.26

type Provider string

Jump to

Keyboard shortcuts

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