email

package
v0.0.0-...-17b847e Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailData

type EmailData struct {
	To       string
	Subject  string
	HTMLBody string
	TextBody string
}

EmailData contains all data needed for sending emails

type EmailService

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

EmailService handles SMTP email sending

func NewEmailService

func NewEmailService() *EmailService

NewEmailService creates a new email service instance

func (*EmailService) IsConfigured

func (e *EmailService) IsConfigured() bool

IsConfigured checks if SMTP is properly configured

func (*EmailService) SendEmail

func (e *EmailService) SendEmail(data EmailData) error

SendEmail sends an email using SMTP

type TemplateService

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

TemplateService handles email template rendering

func NewTemplateService

func NewTemplateService() *TemplateService

NewTemplateService creates a new template service

func (*TemplateService) GenerateWelcomeEmail

func (ts *TemplateService) GenerateWelcomeEmail(data WelcomeEmailData) (htmlBody, textBody string, err error)

GenerateWelcomeEmail generates HTML and text versions of welcome email

func (*TemplateService) ValidateTemplates

func (ts *TemplateService) ValidateTemplates() error

ValidateTemplates checks if required template files exist

type WelcomeEmailData

type WelcomeEmailData struct {
	UserName         string
	UserEmail        string
	OrganizationName string
	OrganizationType string
	UserRoles        []string
	TempPassword     string
	LoginURL         string
	SupportEmail     string
	CompanyName      string
}

WelcomeEmailData contains data for welcome email template

type WelcomeEmailService

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

WelcomeEmailService handles sending welcome emails to new users

func NewWelcomeEmailService

func NewWelcomeEmailService() *WelcomeEmailService

NewWelcomeEmailService creates a new welcome email service

func (*WelcomeEmailService) SendWelcomeEmail

func (w *WelcomeEmailService) SendWelcomeEmail(userEmail, userName, organizationName, organizationType string, userRoles []string, tempPassword string) error

SendWelcomeEmail sends a welcome email with organization and user roles information

Jump to

Keyboard shortcuts

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