Documentation
¶
Overview ¶
Package sendingaccessnotice emails an account owner the operator's decision on an external sending access request.
The local operator commands (-approve-external-sending with -external-sending-request-id, and -decline-external-sending-request) decide the request in their own committed transaction, then call NotifyDecision. The notice is platform mail about the account, so it leaves through the same authorized seam as every other notification: a customer_notification operation prepared from the durable request row, Reserve, ConsumeAttempt, and one ProviderSubmitter call per charged attempt. The envelope is the gate's (the account owner's current address), never a caller's.
Content is operator-authored only. The customer's free-text request fields are never echoed back: the notice states the decision and where to go next.
Index ¶
Constants ¶
const ( DecisionApproved = "approved" DecisionDeclined = "declined" )
Decision states the notice reports, mirroring the request row.
const SendingAccessPath = "/sending-access"
SendingAccessPath is the dashboard page a declined notice links to.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier composes and sends decision notices.
func New ¶
func New(pool TxBeginner, gate sendingpolicy.Gate, s Submitter, fromDomain, fromAddress, replyTo, publicURL string) *Notifier
New returns a Notifier. fromDomain is outbound_smtp.from_domain; fromAddress and replyTo are the optional notifications.from_address and notifications.reply_to values (the deployment's notification identity); publicURL builds the dashboard links (empty degrades to generic copy).
func (*Notifier) NotifyDecision ¶
NotifyDecision emails the owner of the request's account the decision the request row records. It returns an error when the notice was not sent; the caller (an operator command whose decision has already committed) reports it as a warning and does not fail.
type Submitter ¶
type Submitter interface {
SubmitOnce(ctx context.Context, auth sendingpolicy.ProviderAuthorization, env outbound.Envelope) (outbound.ProviderResult, error)
}
Submitter is the one provider seam (*outbound.ProviderSubmitter).