Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvitationData ¶
type InvitationData struct {
InvitedBy string // Name/email of the admin who sent the invitation
InviteLink string // Full URL to accept the invitation
CurrentYear int // Current year for copyright notice
}
InvitationData holds data for rendering the invitation email template
type Sender ¶
type Sender interface {
SendInvitation(ctx context.Context, to, inviteLink, invitedBy string) error
}
Sender is the interface for sending emails. Consumers (e.g., users.Service) should depend on this interface rather than *Service directly, enabling easier testing and reduced coupling between packages.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles email sending with multiple provider support (SMTP or Resend)
func NewService ¶
func NewService(cfg config.EmailConfig, templatesDir string, logger zerolog.Logger) (*Service, error)
NewService creates a new email service instance templatesDir should point to the directory containing HTML email templates (e.g., "web/email/templates")
Click to show internal directories.
Click to hide internal directories.