aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorfrancis <francis>2009-04-08 07:31:07 +0000
committerfrancis <francis>2009-04-08 07:31:07 +0000
commit0960200802d7c87940cd0c7348d2f612c4f15d65 (patch)
tree9ed72928a3759b4a7e0d0cebb1710f6a8a7d2e9c /app/models/user.rb
parent2424bdf7da5346a6bf28dbaf9ff4d9bfd70b070c (diff)
TMail rebuilds address when constructing emails. Move our more
aggressive quoting rule into a TMail monkey patch proper so it is always called when constructing emails, and remove the hacky function (Address.encode_quoted_string) it used to call in special places
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index c281d7f18..4638583e2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.87 2009-04-07 10:32:54 louise Exp $
+# $Id: user.rb,v 1.88 2009-04-08 07:31:07 francis Exp $
require 'digest/sha1'
@@ -174,7 +174,7 @@ class User < ActiveRecord::Base
# For use in to/from in email messages
def name_and_email
- return TMail::Address.encode_quoted_string(self.name) + " <" + self.email + ">"
+ return TMail::Address.address_from_name_and_email(self.name, self.email).to_s
end
# The "internal admin" is a special user for internal use.