membermail

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package membermail writes the emails ReputeCast sends to team members: invitations, password resets, email changes, two-factor resets and notifications, in the member's app language. internal/systemmail wraps them in the branded layout and sends them through the System stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminPasswordReset

func AdminPasswordReset(l i18n.Lang, instance, admin, email, link string) mailer.Message

AdminPasswordReset is a reset link an instance admin sent.

func DefaultReason

func DefaultReason(l i18n.Lang, brand string) string

DefaultReason is "This is an automated message from Acme ReputeCast."

func EmailChange

func EmailChange(l i18n.Lang, instance, oldEmail, link string) mailer.Message

EmailChange asks to confirm a new sign-in address.

func EmailChanged

func EmailChanged(l i18n.Lang, instance, oldEmail, newEmail string) mailer.Message

EmailChanged tells the previous address that the sign-in email changed.

func Footer(l i18n.Lang, instance, workspace, host string) string

Footer is "Sent by Acme ReputeCast for Acme Newsletter · reputecast.acme.io".

func Invitation

func Invitation(l i18n.Lang, d InvitationEmail) mailer.Message

Invitation writes an invitation email.

func Notification

func Notification(l i18n.Lang, d NotificationEmail) mailer.Message

Notification writes a notification email: one notification in full, or a digest.

func PasswordReset

func PasswordReset(l i18n.Lang, instance, email, link string) mailer.Message

PasswordReset is the link someone asked for to reset their password.

func Reason

func Reason(l i18n.Lang, kind string) (reason string, ok bool)

Reason says why a message of a member kind was sent, in the reader's language. ok is false for kinds it doesn't know (subscribers' mail).

func SignInReminder

func SignInReminder(l i18n.Lang, instance, email, provider, link string) mailer.Message

SignInReminder tells someone without a password how they sign in.

func TwoFactorReset

func TwoFactorReset(l i18n.Lang, instance, admin, email, reason string, before time.Time) mailer.Message

TwoFactorReset tells a member an instance admin reset their two-factor.

Types

type InvitationEmail

type InvitationEmail struct {
	Inviter, Workspace, Role string
	// Message is the inviter's own words, kept as written.
	Message string
	Link    string
	Expires time.Time
}

InvitationEmail is an invitation to join a workspace, in the invitation's language.

type NotificationEmail

type NotificationEmail struct {
	Workspace string
	Items     []NotificationLine
	// Base is the instance's public URL; Preferences the notification preferences page.
	Base, Preferences string
}

NotificationEmail is one notification, or a digest of several from one workspace.

type NotificationLine

type NotificationLine struct {
	Title, Body string
	// Link is an app path, or empty.
	Link string
}

NotificationLine is one notification in an email.

Jump to

Keyboard shortcuts

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