Send this round's messages, and say which rows may now be written
mail_round.RdThe order is the decision: send first, write after. A row whose message did not leave stays as the register has it, so the next round finds it changed again and retries – the queue is the register, and no second state exists to keep aligned. The cost accepted in exchange is a duplicate, never a loss.
Usage
mail_round(
changed,
register,
born,
mailer,
dry_run,
redirect_to = NULL,
copy_to = NULL,
reply_to = NULL,
identified = NULL
)Arguments
- changed
The rows this round would write, from
round_changed().- register
The register as read, carrying every field the messages name.
- born
The accounts created this round: lists with
record_id,upnandcredential.- mailer
function(to, cc, subject, body)returningokanderrors.- dry_run
When
TRUEnothing is sent and every row comes back writable – the round behaves as it did before this file existed.- redirect_to
One address replacing every recipient, for a field test.
- copy_to
Address in copy, on the outcome message only.
- reply_to
Kept for the caller's symmetry with
mail_send(); the mailer closure is what carries it to the transport.- identified
The identity this round settled, as a frame with
record_idand the fields it settled.registeris the register as read, on purpose; this is how the message names what the round has just established rather than what the referent typed.