Skip to content

Releases: croaky/recipient_interceptor

v0.3.2

21 May 00:31
235e556
Compare
Choose a tag to compare

v0.3.1

23 Oct 16:17
d929574
Compare
Choose a tag to compare

This release contains:

  • Improved documentation in README
  • Improved unit tests
  • Added MIT license to gemspec
  • Upgraded rexml dependency to 3.2.5

v0.3.0

21 Feb 21:33
11fd257
Compare
Choose a tag to compare

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.