Rewrites the addresses in an RFC 5322 address list (the value of
From:, To:, Cc:, and similar fields) and keeps every other byte:
display names, comments, groups, and folding.
iex> Sovite.Message.AddressList.rewrite(~s|"Alice (work)" <alice@host.example.com>, bob@x|, &String.upcase/1)
~s|"Alice (work)" <ALICE@HOST.EXAMPLE.COM>, BOB@X|fun gets each address as written (local@domain) and returns the
replacement. Anything that does not parse as an address is left alone,
so a malformed field passes through unchanged.
Summary
Functions
Rewrites each address in value with fun.
Rewrites the addresses in a whole header field ("To: a@b\r\n"), as
kept by Sovite.Message.Headers.
Functions
Rewrites each address in value with fun.
Rewrites the addresses in a whole header field ("To: a@b\r\n"), as
kept by Sovite.Message.Headers.