aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-04-30 08:21:54 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-04-30 08:21:54 +0000
commitbe27caf92db41f1a5dc94e7c2913467e7e493eeb (patch)
treee8b33ea2c6e360ac5c004b52c502ae86a9ae44f9
parentfe00c275cd1c379af5e4e2a72040febea6b98632 (diff)
downloadrails-be27caf92db41f1a5dc94e7c2913467e7e493eeb.tar.gz
rails-be27caf92db41f1a5dc94e7c2913467e7e493eeb.tar.bz2
rails-be27caf92db41f1a5dc94e7c2913467e7e493eeb.zip
Fixed that email address like "Jamis Buck, M.D." <wild.medicine@example.net> would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionmailer/CHANGELOG5
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/actionmailer/CHANGELOG b/actionmailer/CHANGELOG
index 412edf6b9c..bb87dd9014 100644
--- a/actionmailer/CHANGELOG
+++ b/actionmailer/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Fixed that email address like "Jamis Buck, M.D." <wild.medicine@example.net> would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 [Jamis Buck]
+
+
*0.9.1* (20th April, 2005)
* Depend on Action Pack 1.8.1
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 36159028b7..3b9d25723b 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -168,7 +168,7 @@ module ActionMailer #:nodoc:
elsif address =~ /^(\S.*)\s+(<.*>)$/
address = $2
phrase = quote_if_necessary($1.gsub(/^['"](.*)['"]$/, '\1'), charset)
- "#{phrase} #{address}"
+ "\"#{phrase}\" #{address}"
else
address
end