// Package mail holds admin's configured email sender.
//
// The transport, the templates and the look all live in shared/mail, which the
// control plane and sitesvc use too — this package exists only so that admin's
// mail configuration is a boot-time singleton like licensing's signing key,
// paddle's client and auth's Redis handle, rather than a value threaded through
// api, auth, billing and lifecycle.
package mail

import "gitea.hostxtra.co.uk/mrhid6/vantage/shared/mail"

// Default is admin's sender. Set once by main; read everywhere else.
var Default mail.Sender

func Init(s mail.Sender) { Default = s }

// Enabled reports whether SMTP is configured. Callers check it to skip a send
// politely rather than logging a failure per message.
func Enabled() bool { return Default.Enabled() }
