email

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `mapstructure:"host"`
	Port     int    `mapstructure:"port"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	From     string `mapstructure:"from"`
}

func (*Config) Bind

func (c *Config) Bind()

func (*Config) Validate

func (c *Config) Validate() error

type Service

type Service interface {
	// SendWorkspaceRequestNotification notifies subscribed admins about a new workspace request.
	SendWorkspaceRequestNotification(ctx context.Context, ws *model.Workspace, subscribers []model.Subscriber) error
	// SendWorkspaceApprovalNotification notifies workspace users about approval/denial.
	SendWorkspaceApprovalNotification(ctx context.Context, ws *model.Workspace, approved bool) error
}

Service sends email notifications.

func NewSMTPService

func NewSMTPService(cfg Config) Service

NewSMTPService creates a new SMTP email service.

Jump to

Keyboard shortcuts

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