Cross Reference: prevent_mail_interceptor.rb
xref
: /
ontohub
/
lib
/
prevent_mail_interceptor.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
class
PreventMailInterceptor
RE
= /.*@
example
\.
com
/
def
self.delivering
_email
(
message
)
unless
deliver
?
(
message
)
message.perform
_deliveries
=
false
Rails.logger.debug
"Interceptor prevented sending mail #{
message.inspect
}!"
end
end
def
self.deliver
?
(
message
)
message.to.any
?
{ |
recipient
|
recipient
!~
RE
}
end
end