emails

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHtmlEmailTemplate

func RenderHtmlEmailTemplate(templateName string, data map[string]any) (string, error)

RenderHtmlEmailTemplate: renders an HTML email template with the provided data.

Parameters: - templateName: the name of the template to render (e.g., "email_verify_address_html"). - data: a map containing the data to be injected into the template.

func RenderTextEmailTemplate

func RenderTextEmailTemplate(templateName string, data map[string]any) (string, error)

RenderTextEmailTemplate: renders an text email template with the provided data.

Parameters: - templateName: the name of the template to render (e.g., "email_verify_address"). - data: a map containing the data to be injected into the template.

func SendEmailVerificationEmail

func SendEmailVerificationEmail(
	user models.User,
	verificationUrl string,
) error

SendEmailVerificationEmail renders and sends an email verification email to the given user with the provided verification URL.

func SendRatelimitExceededMultipleTimesEmail

func SendRatelimitExceededMultipleTimesEmail(
	ipAddress string,
	endpoint string,
) error

SendRatelimitExceededMultipleTimesEmail sends an email to notify all admins that the rate limit on an endpoint has been exceeded multiple times by an IP address.

func SendTestEmail

func SendTestEmail(
	emailAddress string,
) (err error)

SendTestEmail renders and sends an email to test that the email sending service is working. The message is not sent with a bg task like other email. In this way it's possibile get more details about failures.

func SendUserAlreadyExistsEmail

func SendUserAlreadyExistsEmail(
	emailAddress string,
) error

SendUserAlreadyExistsEmail renders and sends an email to notify that the email address is already associated with an existing account.

func SendUserApprovedEmail

func SendUserApprovedEmail(user models.User) error

SendUserApprovedEmail sends an email to notify a new user that their account has been approved by an admin.

func SendUserWaitingForApprovalEmail

func SendUserWaitingForApprovalEmail(user models.User) error

SendUserWaitingForApprovalEmail sends an email to notify all the superusers that there is a user that is waiting for approval

Types

This section is empty.

Jump to

Keyboard shortcuts

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