Documentation
¶
Overview ¶
Package mail sends transactional email (password-reset links and platform announcements) via a configured SMTP relay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendAnnouncementEmail ¶
SendAnnouncementEmail sends a platform announcement's translated body (markdown, per Announcement.Translations) to to, rendered to HTML. subject is caller-supplied — an announcement has no user-facing title of its own (Announcement.Name is an admin-only label, never shown to end users), so callers should pass a generic subject rather than Name. Returns an error when cfg.Host is empty (SMTP not configured), the markdown fails to render, or the send itself fails; callers are expected to treat a failure as "not sent" and retry on a later tick rather than swallowing it permanently.
func SendPasswordResetEmail ¶
SendPasswordResetEmail sends a password-reset confirmation link to to. Returns an error when cfg.Host is empty (SMTP not configured) or the send itself fails; callers are expected to log-and-swallow per RequestPasswordReset's contract.