trym-mail_bouncer 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/mail_bouncer.rb +8 -4
- data/mail_bouncer.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('mail_bouncer', '0.1.
|
5
|
+
Echoe.new('mail_bouncer', '0.1.1') do |p|
|
6
6
|
p.description = "Catch outgoing emails and bounce them to a specified recipient while keeping headers intact."
|
7
7
|
p.url = "http://github.com/trym/mail-bouncer"
|
8
8
|
p.author = "Trym Skaar"
|
data/lib/mail_bouncer.rb
CHANGED
@@ -11,9 +11,11 @@ end
|
|
11
11
|
module TMail
|
12
12
|
class Mail
|
13
13
|
def destinations_with_bouncer(default = nil)
|
14
|
-
MailBouncer.enabled ?
|
15
|
-
|
16
|
-
|
14
|
+
if MailBouncer.enabled and !MailBouncer.recipients.blank?
|
15
|
+
MailBouncer.recipients
|
16
|
+
else
|
17
|
+
destinations_without_bouncer(default)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
alias_method_chain :destinations, :bouncer
|
19
21
|
end
|
@@ -23,7 +25,9 @@ end
|
|
23
25
|
module ActionMailer
|
24
26
|
class Base
|
25
27
|
def perform_delivery_sendmail_with_bouncer(mail)
|
26
|
-
|
28
|
+
if MailBouncer.enabled and !MailBouncer.recipients.blank?
|
29
|
+
sendmail_settings[:arguments].gsub!(/\s*-t\s*/,'')
|
30
|
+
end
|
27
31
|
perform_delivery_sendmail_without_bouncer(mail)
|
28
32
|
end
|
29
33
|
alias_method_chain :perform_delivery_sendmail, :bouncer
|
data/mail_bouncer.gemspec
CHANGED