diaspora/app/mailers/notification_mailers/comment_on_post.rb
2011-10-05 17:12:31 -07:00

15 lines
499 B
Ruby

module NotificationMailers
class CommentOnPost < NotificationMailers::Base
include ActionView::Helpers::TextHelper
attr_accessor :comment
def set_headers(comment_id)
@comment = Comment.find(comment_id)
@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
end
end