diff --git a/app/mailers/notification_mailers/also_commented.rb b/app/mailers/notification_mailers/also_commented.rb index a92f3a2af..73ed95389 100644 --- a/app/mailers/notification_mailers/also_commented.rb +++ b/app/mailers/notification_mailers/also_commented.rb @@ -8,7 +8,7 @@ module NotificationMailers @comment = Comment.find_by_id(comment_id) if mail? - @headers[:from] = "[#{@comment.author.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + @headers[:from] = "\"#{@comment.author.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" @headers[:subject] = truncate(@comment.parent.comment_email_subject, :length => TRUNCATION_LEN) @headers[:subject] = "Re: #{@headers[:subject]}" end diff --git a/app/mailers/notification_mailers/comment_on_post.rb b/app/mailers/notification_mailers/comment_on_post.rb index ffb29fbb5..eb3626466 100644 --- a/app/mailers/notification_mailers/comment_on_post.rb +++ b/app/mailers/notification_mailers/comment_on_post.rb @@ -7,7 +7,7 @@ module NotificationMailers def set_headers(comment_id) @comment = Comment.find(comment_id) - @headers[:from] = "[#{@comment.author.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + @headers[:from] = "\"#{@comment.author.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" @headers[:subject] = truncate(@comment.parent.comment_email_subject, :length => TRUNCATION_LEN) @headers[:subject] = "Re: #{@headers[:subject]}" end diff --git a/app/mailers/notification_mailers/private_message.rb b/app/mailers/notification_mailers/private_message.rb index 2cbc655c3..b258ab563 100644 --- a/app/mailers/notification_mailers/private_message.rb +++ b/app/mailers/notification_mailers/private_message.rb @@ -7,7 +7,7 @@ module NotificationMailers @conversation = @message.conversation @participants = @conversation.participants - @headers[:from] = "[#{@message.author.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + @headers[:from] = "\"#{@message.author.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" @headers[:subject] = @conversation.subject.strip @headers[:subject] = "Re: #{@headers[:subject]}" if @conversation.messages.size > 1 end diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb index 5ab77d1bd..1d0092564 100644 --- a/spec/mailers/notifier_spec.rb +++ b/spec/mailers/notifier_spec.rb @@ -172,7 +172,7 @@ describe Notifier do end it "FROM: contains the sender's name" do - @mail["From"].to_s.should == "[#{@cnv.author.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + @mail["From"].to_s.should == "\"#{@cnv.author.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" end it 'SUBJECT: has a snippet of the post contents' do @@ -207,7 +207,7 @@ describe Notifier do end it "FROM: contains the sender's name" do - comment_mail["From"].to_s.should == "[#{eve.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + comment_mail["From"].to_s.should == "\"#{eve.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" end it 'SUBJECT: has a snippet of the post contents' do @@ -248,7 +248,7 @@ describe Notifier do end it 'FROM: has the name of person commenting as the sender' do - comment_mail["From"].to_s.should == "[#{eve.name} (Diaspora*)] <#{AppConfig[:smtp_sender_address]}>" + comment_mail["From"].to_s.should == "\"#{eve.name} (Diaspora*)\" <#{AppConfig[:smtp_sender_address]}>" end it 'SUBJECT: has a snippet of the post contents' do