action_mailer-logged_smtp_delivery 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/action_mailer/logged_smtp_delivery.rb +9 -19
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 255245f18909d06934cf4decb49c917324d4d978
|
4
|
+
data.tar.gz: acbf0860c281272f8b22eea87abc5e06a2a84863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b663d5f3d969aad92f1044db293a16a10acf449f33e6adc2ad3c3d0107b0ff41838b7b559d49b2cba14ed1f6db9341701eca1a33c607687dd68eb10b7f596d7
|
7
|
+
data.tar.gz: af8c56ae41f77cb2e28cab89d6c50f761362f4501ec2c5139d2e9b7e3f1ad591d3eb76fc48887b53ba49a8aa69f779264c7017f795b6e0a1954d085cf73c57e9
|
@@ -10,34 +10,24 @@ class ActionMailer::LoggedSMTPDelivery < Mail::SMTP
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def deliver!(mail)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
13
|
+
if logger = settings[:mail_file_logger]
|
14
|
+
path = logger.log(mail.encoded)
|
15
|
+
log mail, "stored at #{path}"
|
16
|
+
end
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
log_headers(mail)
|
19
|
+
log mail, "sender: #{mail.sender}"
|
20
|
+
log mail, "destinations: #{mail.destinations.inspect}"
|
22
21
|
|
23
|
-
|
22
|
+
response = super
|
24
23
|
|
25
|
-
|
26
|
-
end
|
24
|
+
log mail, "done #{response.inspect}"
|
27
25
|
end
|
28
26
|
|
29
27
|
private
|
30
28
|
|
31
29
|
attr_accessor :logger
|
32
30
|
|
33
|
-
def without_bcc(mail)
|
34
|
-
original_bcc = mail.bcc
|
35
|
-
mail.bcc = nil
|
36
|
-
yield mail
|
37
|
-
ensure
|
38
|
-
mail.bcc = original_bcc
|
39
|
-
end
|
40
|
-
|
41
31
|
def log_headers(mail)
|
42
32
|
log mail, "#{log_header}: [#{mail[log_header]}]" if log_header
|
43
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_mailer-logged_smtp_delivery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Chapweske
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|