Class: MList::Manager::Notifier

Inherits:
Object
  • Object
show all
Defined in:
lib/mlist/manager/notifier.rb

Overview

Constructs the notices that are sent to list subscribers. Applications may subclass this to customize the content of a notice delivery.

Instance Method Summary collapse

Instance Method Details

#subscriber_blocked(list, email, subscriber) ⇒ Object

Answers the delivery that will be sent to a subscriber when an MList::List indicates that the distribution of an email from that subscriber has been blocked.



13
14
15
16
17
18
19
20
21
# File 'lib/mlist/manager/notifier.rb', line 13

def subscriber_blocked(list, email, subscriber)
  delivery = MList::Util::TMailBuilder.new(TMail::Mail.new)
  delivery.write_header('x-mlist-loop', 'notice')
  delivery.write_header('x-mlist-notice', 'subscriber_blocked')
  delivery.to = subscriber.rfc5322_email
  delivery.from = "mlist-#{list.address}"
  prepare_subscriber_blocked_content(list, email, subscriber, delivery)
  delivery
end