Documentation
¶
Index ¶
- func RenderTemplate(templateString string, templateVariables map[string]any) (*bytes.Buffer, error)
- func SendEmailWithRetries(ctx context.Context, sender types.Emailer, smtpConfig *types.SMTPConfig, ...) error
- func SendEmailWithTemplate(ctx context.Context, emailer types.Emailer, toEmail string, ...) error
- type SMTP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderTemplate ¶
func RenderTemplate( templateString string, templateVariables map[string]any, ) (*bytes.Buffer, error)
RenderTemplate parses and renders an email template with the provided variables.
func SendEmailWithRetries ¶
func SendEmailWithRetries( ctx context.Context, sender types.Emailer, smtpConfig *types.SMTPConfig, smtpAuth *types.SMTPAuth, mail *types.Mail, maxTryCount int, sleepTime time.Duration, ) error
SendEmailWithRetries sends an email with retry logic. It respects context cancellation between retries.
Types ¶
Click to show internal directories.
Click to hide internal directories.