diff --git a/lib/email/sender.rb b/lib/email/sender.rb index 9214c597524..1311f5b0146 100644 --- a/lib/email/sender.rb +++ b/lib/email/sender.rb @@ -77,7 +77,7 @@ module Email end end - "\"#{site_name.gsub(/\"/, "'")}\" <#{Slug.for(site_name)}.#{host}>" + "\"#{site_name.gsub(/\"/, "'")}\" " end private diff --git a/spec/components/email/sender_spec.rb b/spec/components/email/sender_spec.rb index 695f4b95f59..abb1f2bf956 100644 --- a/spec/components/email/sender_spec.rb +++ b/spec/components/email/sender_spec.rb @@ -23,27 +23,27 @@ describe Email::Sender do context "list_id_for" do it "joins the host and forum name" do - Email::Sender.list_id_for("myforum", "http://mysite.com").should == '"myforum" ' + Email::Sender.list_id_for("myforum", "http://mysite.com").should == '"myforum" ' end it "uses localhost when no host is present" do - Email::Sender.list_id_for("myforum", nil).should == '"myforum" ' + Email::Sender.list_id_for("myforum", nil).should == '"myforum" ' end it "uses localhost with a weird host" do - Email::Sender.list_id_for("Fun", "this is not a real host").should == '"Fun" ' + Email::Sender.list_id_for("Fun", "this is not a real host").should == '"Fun" ' end it "removes double quotes from names" do - Email::Sender.list_id_for('Quoted "Forum"', 'http://quoted.com').should == '"Quoted \'Forum\'" ' + Email::Sender.list_id_for('Quoted "Forum"', 'http://quoted.com').should == '"Quoted \'Forum\'" ' end it "converts the site name to lower case and removes spaces" do - Email::Sender.list_id_for("Robin's cool Forum!", "http://robin.com").should == '"Robin\'s cool Forum!" ' + Email::Sender.list_id_for("Robin's cool Forum!", "http://robin.com").should == '"Robin\'s cool Forum!" ' end it "downcases host names" do - Email::Sender.list_id_for("cool", "http://ForumSite.com").should == '"cool" ' + Email::Sender.list_id_for("cool", "http://ForumSite.com").should == '"cool" ' end end