Documentation
¶
Index ¶
- func RenderHtmlEmailTemplate(templateName string, data map[string]any) (string, error)
- func RenderTextEmailTemplate(templateName string, data map[string]any) (string, error)
- func SendEmailVerificationEmail(user models.User, verificationUrl string) error
- func SendRatelimitExceededMultipleTimesEmail(ipAddress string, endpoint string) error
- func SendTestEmail(emailAddress string) (err error)
- func SendUserAlreadyExistsEmail(emailAddress string) error
- func SendUserApprovedEmail(user models.User) error
- func SendUserWaitingForApprovalEmail(user models.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderHtmlEmailTemplate ¶
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 ¶
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 ¶
SendEmailVerificationEmail renders and sends an email verification email to the given user with the provided verification URL.
func SendRatelimitExceededMultipleTimesEmail ¶
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 ¶
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 ¶
SendUserAlreadyExistsEmail renders and sends an email to notify that the email address is already associated with an existing account.
func SendUserApprovedEmail ¶
SendUserApprovedEmail sends an email to notify a new user that their account has been approved by an admin.
func SendUserWaitingForApprovalEmail ¶
SendUserWaitingForApprovalEmail sends an email to notify all the superusers that there is a user that is waiting for approval
Types ¶
This section is empty.