action_mailer_verp 0.0.2 → 0.0.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{action_mailer_verp}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Golick"]
@@ -25,9 +25,10 @@ module ActionMailerVerp
25
25
  raise MultipleRecipientsError, "Multiple recipients not supported."
26
26
  end
27
27
 
28
- from = mail.from_addrs.first
29
- local = "#{from.local}+#{mail.to.first.gsub("@", "=")}"
30
- mail.from = "#{from.name} <#{local}@#{from.domain}>"
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 "rewrites the from address to be VERP compatible" do
34
- addr = @mail.from_addrs.first
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: 27
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Golick