action_mailer_verp 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/action_mailer_verp.gemspec +1 -1
- data/lib/action_mailer_verp.rb +4 -3
- data/spec/action_mailer_verp_spec.rb +2 -3
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/action_mailer_verp.gemspec
CHANGED
data/lib/action_mailer_verp.rb
CHANGED
@@ -25,9 +25,10 @@ module ActionMailerVerp
|
|
25
25
|
raise MultipleRecipientsError, "Multiple recipients not supported."
|
26
26
|
end
|
27
27
|
|
28
|
-
from
|
29
|
-
local
|
30
|
-
|
28
|
+
from = mail.from_addrs.first
|
29
|
+
local = "#{from.local}+#{mail.to.first.gsub("@", "=")}"
|
30
|
+
return_path = "#{local}@#{from.domain}"
|
31
|
+
mail['return-path'] = return_path
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
@@ -30,11 +30,10 @@ describe "ActionMailerVerp" do
|
|
30
30
|
@mail = MyMailer.create_some_mail("james@example.com")
|
31
31
|
end
|
32
32
|
|
33
|
-
it "
|
34
|
-
addr = @mail.
|
33
|
+
it "sets the return-path to the VERP address" do
|
34
|
+
addr = @mail['return-path'].addr
|
35
35
|
addr.local.should == "donotreply+james=example.com"
|
36
36
|
addr.domain.should == "mycompany.com"
|
37
|
-
addr.name.should == "MyCompany"
|
38
37
|
end
|
39
38
|
end
|
40
39
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_mailer_verp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Golick
|