Mutare.Swoosh.Sender (mutare_swoosh v0.2.1)

Copy Markdown View Source

:swoosh_sender swaps from and reply_to in Swoosh email construction, and removes reply_to.

A literal list reply_to value is not changed into from, because Swoosh.Email.from/2 accepts a single mailbox while reply_to/2 may accept a list. The removal has no such restriction: a reply_to(email, value) call collapses to the email (a piped stage to what was piped into it), and the reply_to: option in Swoosh.Email.new/1 is dropped — replies then silently go to from.

No from removal is generated: Swoosh validates the sender at delivery, so that mutant would fail validation without testing assertions about the sender.