Mail doesn't seem to like the name-addr spec from RFC2822
This commit is contained in:
parent
71681d1bc7
commit
32f1b61719
4 changed files with 6 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ module NotificationMailers
|
||||||
@comment = Comment.find_by_id(comment_id)
|
@comment = Comment.find_by_id(comment_id)
|
||||||
|
|
||||||
if mail?
|
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] = truncate(@comment.parent.comment_email_subject, :length => TRUNCATION_LEN)
|
||||||
@headers[:subject] = "Re: #{@headers[:subject]}"
|
@headers[:subject] = "Re: #{@headers[:subject]}"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ module NotificationMailers
|
||||||
def set_headers(comment_id)
|
def set_headers(comment_id)
|
||||||
@comment = Comment.find(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] = truncate(@comment.parent.comment_email_subject, :length => TRUNCATION_LEN)
|
||||||
@headers[:subject] = "Re: #{@headers[:subject]}"
|
@headers[:subject] = "Re: #{@headers[:subject]}"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ module NotificationMailers
|
||||||
@conversation = @message.conversation
|
@conversation = @message.conversation
|
||||||
@participants = @conversation.participants
|
@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] = @conversation.subject.strip
|
||||||
@headers[:subject] = "Re: #{@headers[:subject]}" if @conversation.messages.size > 1
|
@headers[:subject] = "Re: #{@headers[:subject]}" if @conversation.messages.size > 1
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ describe Notifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "FROM: contains the sender's name" do
|
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
|
end
|
||||||
|
|
||||||
it 'SUBJECT: has a snippet of the post contents' do
|
it 'SUBJECT: has a snippet of the post contents' do
|
||||||
|
|
@ -207,7 +207,7 @@ describe Notifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "FROM: contains the sender's name" do
|
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
|
end
|
||||||
|
|
||||||
it 'SUBJECT: has a snippet of the post contents' do
|
it 'SUBJECT: has a snippet of the post contents' do
|
||||||
|
|
@ -248,7 +248,7 @@ describe Notifier do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'FROM: has the name of person commenting as the sender' do
|
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
|
end
|
||||||
|
|
||||||
it 'SUBJECT: has a snippet of the post contents' do
|
it 'SUBJECT: has a snippet of the post contents' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue