smtp

package
v0.0.0-...-13f8ea2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 4 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
	Port     int
	Username string
	Password string
	From     string
}

Config holds SMTP configuration

func ConfigFromEnv

func ConfigFromEnv() Config

ConfigFromEnv creates a Config from environment variables

type SMTPSender

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

SMTPSender implements the Sender interface using SMTP

func NewSMTPSender

func NewSMTPSender(config Config) *SMTPSender

NewSMTPSender creates a new SMTP sender

func (*SMTPSender) Send

func (s *SMTPSender) Send(recipient, subject, body string) error

Send sends an email via SMTP

type Sender

type Sender interface {
	Send(recipient, subject, body string) error
}

Sender interface defines methods for sending emails

Jump to

Keyboard shortcuts

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