email

package
v0.0.0-...-bd854b1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeTextPlain = "text/plain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SMTPConfig
	Email    string `json:"email" yaml:"email"`
	Password string `json:"password" yaml:"password"`
}

type Manager

type Manager interface {
	SendRegistrationNotification(message *Message) error
}

func NewEmailManager

func NewEmailManager(config *Config) Manager

type Message

type Message struct {
	To      string
	Subject string
	Body    any
}

type SMTPConfig

type SMTPConfig struct {
	Host string `json:"host" yaml:"host"`
	Port int    `json:"port" yaml:"port"`
}

type SMTPEmailManager

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

func (SMTPEmailManager) SendRegistrationNotification

func (e SMTPEmailManager) SendRegistrationNotification(message *Message) error

Jump to

Keyboard shortcuts

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