Releases: croaky/recipient_interceptor
Releases · croaky/recipient_interceptor
v0.3.2
Upgraded rexml dependency to 3.2.8 to address CVE-2024-35176
https://www.ruby-lang.org/en/news/2024/05/16/dos-rexml-cve-2024-35176/
v0.3.1
v0.3.0
Previously, you could prefix the subject line with static text:
Mail.register_interceptor(
RecipientInterceptor.new(
ENV["EMAIL_RECIPIENTS"],
subject_prefix: "[staging]",
),
)
Now, you still prefix with static text.
Or, you can use a proc to prefix the subject line
with contents from the original message:
Mail.register_interceptor(
RecipientInterceptor.new(
ENV["EMAIL_RECIPIENTS"],
subject_prefix: proc { |msg| "[staging] [#{(msg.to + msg.cc + msg.bcc).sort.join(",")}]" }
),
)
The object passed to the proc is an instance of
Mail::Message
.