actionmailer_interceptor 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2629937ddda62b5565ef03ee9849b7f0decb236
|
4
|
+
data.tar.gz: 33d5134ac03f4b4a13514587d30c55d762d2a646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cbcc23e50534b16ee19fcc145ab7bd7a4b3d46ffbead52ff08b02eb15bfcd3e622b8a2f88c9fcf3bcbeaca86ca46d9e30b765a731f44d23c8c5fd1eb3256052
|
7
|
+
data.tar.gz: 2f102498c7719b949dddd0ef2ed869ff26018d7e84638e90cf10c06100b8ca7c98a4a9184dce06e76d1938c32a904c8ee2f28200c4fd6f7a927cf26b9624990c
|
@@ -1,11 +1,5 @@
|
|
1
1
|
module ActionmailerInterceptor
|
2
2
|
class MailInterceptor
|
3
|
-
attr_accessor :redirection_email
|
4
|
-
|
5
|
-
def initialize(options={})
|
6
|
-
@redirection_email = options[:redirection_email]
|
7
|
-
end
|
8
|
-
|
9
3
|
def self.delivering_email(message)
|
10
4
|
original_recipients = ' ['
|
11
5
|
[:to, :cc, :bcc].each do |field|
|
@@ -15,7 +9,7 @@ module ActionmailerInterceptor
|
|
15
9
|
end
|
16
10
|
original_recipients << ']'
|
17
11
|
message.subject += original_recipients
|
18
|
-
message.to =
|
12
|
+
message.to = ENV['redirection_email']
|
19
13
|
end
|
20
14
|
end
|
21
15
|
end
|