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 ¶
- func AdminPasswordReset(l i18n.Lang, instance, admin, email, link string) mailer.Message
- func DefaultReason(l i18n.Lang, brand string) string
- func EmailChange(l i18n.Lang, instance, oldEmail, link string) mailer.Message
- func EmailChanged(l i18n.Lang, instance, oldEmail, newEmail string) mailer.Message
- func Footer(l i18n.Lang, instance, workspace, host string) string
- func Invitation(l i18n.Lang, d InvitationEmail) mailer.Message
- func Notification(l i18n.Lang, d NotificationEmail) mailer.Message
- func PasswordReset(l i18n.Lang, instance, email, link string) mailer.Message
- func Reason(l i18n.Lang, kind string) (reason string, ok bool)
- func SignInReminder(l i18n.Lang, instance, email, provider, link string) mailer.Message
- func TwoFactorReset(l i18n.Lang, instance, admin, email, reason string, before time.Time) mailer.Message
- type InvitationEmail
- type NotificationEmail
- type NotificationLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminPasswordReset ¶
AdminPasswordReset is a reset link an instance admin sent.
func DefaultReason ¶
DefaultReason is "This is an automated message from Acme ReputeCast."
func EmailChange ¶
EmailChange asks to confirm a new sign-in address.
func EmailChanged ¶
EmailChanged tells the previous address that the sign-in email changed.
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 ¶
PasswordReset is the link someone asked for to reset their password.
func Reason ¶
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 ¶
SignInReminder tells someone without a password how they sign in.
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 ¶
NotificationLine is one notification in an email.