Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailPluginConfig ¶
type EmailPluginConfig struct {
Enabled bool `json:"enabled" toml:"enabled"`
// Primary provider to use
Provider EmailProviderType `json:"provider" toml:"provider"`
// Optional fallback provider if primary fails
FallbackProvider EmailProviderType `json:"fallback_provider" toml:"fallback_provider"`
// FromAddress is the email address to send from
FromAddress string `json:"from_address" toml:"from_address"`
// TLSMode defines the TLS mode for SMTP provider
TLSMode SMTPTLSMode `json:"tls_mode" toml:"tls_mode"`
// SMTP configuration
SMTP *SMTPConfig `json:"smtp" toml:"smtp"`
// Resend configuration
Resend *ResendConfig `json:"resend" toml:"resend"`
}
EmailPluginConfig contains configuration for the email plugin
type EmailProviderType ¶
type EmailProviderType string
const ( ProviderSMTP EmailProviderType = "smtp" ProviderResend EmailProviderType = "resend" )
func (EmailProviderType) String ¶ added in v2.8.0
func (e EmailProviderType) String() string
type ResendConfig ¶ added in v2.9.0
type ResendConfig struct {
ApiKey string `json:"api_key" toml:"api_key"`
}
type SMTPConfig ¶ added in v2.9.0
type SMTPTLSMode ¶ added in v2.8.0
type SMTPTLSMode string
const ( SMTPTLSModeOff SMTPTLSMode = "off" SMTPTLSModeStartTLS SMTPTLSMode = "starttls" SMTPTLSModeTLS SMTPTLSMode = "tls" )
func (SMTPTLSMode) String ¶ added in v2.8.0
func (m SMTPTLSMode) String() string
type TemplateData ¶
type TemplateData struct {
UserName string `json:"user_name"`
Email string `json:"email"`
Token string `json:"token"`
URL string `json:"url"`
AppName string `json:"app_name"`
Extra map[string]string `json:"extra"`
}
TemplateData contains all data needed for email template rendering
Click to show internal directories.
Click to hide internal directories.