Versions in this module Expand all Collapse all v1 v1.0.0 Feb 3, 2026 Changes in this version + func IsAccountEmail(templateType TemplateType) bool + func IsLocalSMTPAvailable() bool + type APITokenCreatedData struct + CreatedAt time.Time + ExpiresAt time.Time + IPAddress string + Permissions []string + TokenName string + Username string + type AccountLockedData struct + LockedAt time.Time + Reason string + UnlockInstructions string + Username string + type AdminAlertData struct + AlertLevel string + AlertType string + Details map[string]string + Message string + OccurredAt time.Time + type AdminInviteData struct + ExpiresIn string + InviteLink string + InviterName string + Message string + type BackupCompletedData struct + BackupName string + BackupSize string + CreatedAt time.Time + Duration string + FileCount int + type BackupFailedData struct + BackupName string + Error string + FailedAt time.Time + type BreachAdminAlertData struct + ActionRequired string + AffectedUsers int + BreachDescription string + DetectedAt time.Time + IPAddresses []string + Severity string + type BreachNotificationData struct + AffectedData []string + BreachDate time.Time + BreachDescription string + RecommendedActions []string + SupportContact string + Username string + type Config struct + AdminEmails []string + Enabled bool + From FromConfig + SMTP SMTPConfig + func DefaultConfig() *Config + func DetectAndConfigure() *Config + type DetectedSMTP struct + AuthRequired bool + Host string + Port int + STARTTLS bool + TLS bool + func DetectSMTP() *DetectedSMTP + type EmailTemplate struct + func NewEmailTemplate() *EmailTemplate + func (et *EmailTemplate) PreviewTemplate(templateType TemplateType, siteName, siteURL string) (subject string, body string, err error) + func (et *EmailTemplate) Render(templateType TemplateType, data interface{}) (subject string, body string, err error) + type EmailVerificationData struct + Email string + ExpiresIn string + Username string + VerificationLink string + type FromConfig struct + Email string + Name string + type LoginNotificationData struct + IPAddress string + IsNewDevice bool + Location string + LoginTime time.Time + UserAgent string + Username string + type MFAReminderData struct + DismissLink string + SetupLink string + Username string + type Mailer struct + func NewMailer(cfg *Config) *Mailer + func (ml *Mailer) IsEnabled() bool + func (ml *Mailer) Send(msg *Message) error + func (ml *Mailer) SendAlert(alertType, message string) error + func (ml *Mailer) SendSecurityAlert(event, ip, details string) error + func (ml *Mailer) SendToAdmins(subject, body string) error + func (ml *Mailer) TestConnection() error + type MaintenanceNoticeData struct + AffectedServices []string + Duration string + Reason string + ScheduledAt time.Time + type Message struct + BCC []string + Body string + CC []string + ContentType string + HTMLBody string + Headers map[string]string + Subject string + To []string + func NewMessage(to []string, subject, body string) *Message + func (m *Message) SetHTML(html string) + type PasswordChangedData struct + ChangedAt time.Time + IPAddress string + UserAgent string + Username string + type PasswordResetData struct + ExpiresIn string + IPAddress string + RequestedAt time.Time + ResetLink string + Username string + type SMTPConfig struct + Host string + Password string + Port int + TLS string + Username string + type SSLExpiringData struct + DaysLeft int + Domain string + ExpiresAt time.Time + RenewLink string + type SSLRenewedData struct + Domain string + RenewedAt time.Time + ValidUntil time.Time + type SchedulerErrorData struct + Error string + FailedAt time.Time + TaskDetails map[string]string + TaskName string + type SecurityAlertData struct + ActionRequired string + Details string + Event string + IPAddress string + OccurredAt time.Time + Severity string + type TemplateData struct + SiteName string + SiteURL string + SupportEmail string + Year int + func NewTemplateData(siteName, siteURL, supportEmail string) *TemplateData + type TemplateInfo struct + Description string + IsAccountEmail bool + Name string + Type TemplateType + func GetAllTemplateTypes() []TemplateInfo + type TemplateType string + const Template2FADisabled + const Template2FAEnabled + const TemplateAPITokenCreated + const TemplateAccountLocked + const TemplateAdminAlert + const TemplateAdminInvite + const TemplateBackupCompleted + const TemplateBackupFailed + const TemplateBreachAdminAlert + const TemplateBreachNotification + const TemplateEmailVerification + const TemplateLoginNotification + const TemplateMFAReminder + const TemplateMaintenanceNotice + const TemplatePasswordChanged + const TemplatePasswordReset + const TemplateSSLExpiring + const TemplateSSLRenewed + const TemplateSchedulerError + const TemplateSecurityAlert + const TemplateTest + const TemplateUpdateAvailable + const TemplateWeeklyReport + const TemplateWelcome + type TestEmailData struct + SentAt time.Time + type TwoFactorDisabledData struct + DisabledAt time.Time + IPAddress string + Reason string + Username string + type TwoFactorEnabledData struct + EnabledAt time.Time + IPAddress string + Method string + Username string + type UpdateAvailableData struct + CurrentVersion string + NewVersion string + ReleaseDate time.Time + ReleaseNotes string + UpdateURL string + type WeeklyReportData struct + EngineStats map[string]int + ErrorCount int + PeriodEnd time.Time + PeriodStart time.Time + TopQueries []string + TotalSearches int + UniqueUsers int + type WelcomeData struct + Email string + Username string