email

package
v0.0.0-...-8397e6f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WelcomeEmailHTML

func WelcomeEmailHTML(username, docsURL, logoURL string) string

WelcomeEmailHTML returns a dark, theme-aligned HTML email. Table-based for best compatibility across email clients.

func WelcomeEmailText

func WelcomeEmailText(username, docsURL string) string

Types

type Message

type Message struct {
	FromName string
	FromAddr string
	To       string
	Subject  string
	TextBody string
	HTMLBody string // optional
}

type SMTPConfig

type SMTPConfig struct {
	Host     string // e.g. "smtp.protonmail.ch"
	Port     int    // 587 (STARTTLS) or 465 (TLS)
	Username string // Proton SMTP username
	Password string // SMTP token / API key
	Timeout  time.Duration
	UseTLS   bool // true for implicit TLS (465)
	StartTLS bool // true for STARTTLS (587)
}

type SMTPSender

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

func NewSMTPSender

func NewSMTPSender(cfg SMTPConfig) *SMTPSender

func (*SMTPSender) Send

func (s *SMTPSender) Send(ctx context.Context, msg Message) error

type Sender

type Sender interface {
	Send(ctx context.Context, msg Message) error
}

Jump to

Keyboard shortcuts

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