Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 0.1.0 ready!

  • Loading branch information...
commit 957a258c8f618adc860c9ca3c13c8c377376818a 1 parent 463f13e
@ryansch authored
Showing with 75 additions and 0 deletions.
  1. +13 −0 lib/mail_actual_recipient.rb
  2. +62 −0 mail_actual_recipient.gemspec
View
13 lib/mail_actual_recipient.rb
@@ -0,0 +1,13 @@
+require 'rubygems'
+require 'mail'
+
+module Mail
+ class Message
+ def destinations_with_actual_recipient
+ actual_recipient = header[:actual_recipient] ? [header[:actual_recipient].to_s.gsub(/^.*</, "").gsub(/>/, "")].flatten : []
+ [actual_recipient].compact.flatten
+ end
+
+ alias_method_chain :destinations, :actual_recipient
+ end
+end
View
62 mail_actual_recipient.gemspec
@@ -0,0 +1,62 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{mail_actual_recipient}
+ s.version = "0.1.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Ryan Schlesinger"]
+ s.date = %q{2011-01-14}
+ s.description = %q{Parses the actual recipient header to determine the destinations.}
+ s.email = %q{ryan@aceofsales.com}
+ s.extra_rdoc_files = [
+ "LICENSE.txt",
+ "README.rdoc"
+ ]
+ s.files = [
+ ".document",
+ "Gemfile",
+ "Gemfile.lock",
+ "LICENSE.txt",
+ "README.rdoc",
+ "Rakefile",
+ "VERSION",
+ "lib/mail_actual_recipient.rb"
+ ]
+ s.homepage = %q{http://github.com/ryansch/mail_actual_recipient}
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.7}
+ s.summary = %q{Adds actual recipient header support to mail}
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<mail>, [">= 0"])
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
+ s.add_development_dependency(%q<rcov>, [">= 0"])
+ s.add_development_dependency(%q<rspec>, [">= 0"])
+ else
+ s.add_dependency(%q<mail>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
+ s.add_dependency(%q<rcov>, [">= 0"])
+ s.add_dependency(%q<rspec>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<mail>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
+ s.add_dependency(%q<rcov>, [">= 0"])
+ s.add_dependency(%q<rspec>, [">= 0"])
+ end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.