ConfigPrefix (smtpconfig/config.go)

iota-sdk · pkg/config/stdconfig/smtpconfig/config.go · go · Apache-2.0
email

Typed SMTP configuration with validation and default handling for email delivery.

// Source: https://github.com/iota-uz/iota-sdk | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Package smtpconfig provides typed configuration for SMTP email delivery.
// It is a stdconfig package intended to be registered via config.Register[smtpconfig.Config].
package smtpconfig

// Config holds SMTP connection settings.
//
// Env prefix: "smtp" (e.g. SMTP_HOST → smtp.host, SMTP_PASSWORD → smtp.password).
type Config struct {
	Host     string `koanf:"host"`
	Port     int    `koanf:"port"     default:"587"`
	Username string `koanf:"username"`
	Password string `koanf:"password" secret:"true"`
	// From is the sender email address.
	From string `koanf:"from"`
}

// ConfigPrefix r

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key