留言邮件问题

This commit is contained in:
wanglinchun 2013-12-26 15:24:03 +08:00
parent 7b895e5cde
commit d48d17bece
3 changed files with 11 additions and 7 deletions

View File

@ -30,15 +30,17 @@ class Mailer < ActionMailer::Base
# Builds a Mail::Message object used to email recipients of the added journals for message.
#
def journals_for_message_add(user, journals_for_message)
@user = User.current
@user = journals_for_message.user
if journals_for_message.jour_type!="Project"&&journals_for_message.jour_type!="Bid"
@mail = journals_for_message.jour
if(journals_for_message.reply_id==0)
@mail = journals_for_message.jour
else
@mail = journals_for_message.at_user
end
@message = journals_for_message.notes
@url = url_for(:controller => 'users', :action => 'user_newfeedback', :id => @mail)
mail :to => @mail.mail,
:subject => "#@user leave your a message"
@url = url_for(:controller => 'users', :action => 'user_newfeedback', :id => journals_for_message.jour)
str = "#{@user} #{t(:label_leave_your_message, :locale => 'zh')}"
mail :to => @mail.mail, :subject => str
end
end

View File

@ -1260,6 +1260,7 @@ en:
label_leave_me_message: left a message to me
label_leave_others_message: leave message to him/her
label_leave_a_message: Leave him/her a message
label_leave_your_message: Leave a message to you
label_new_activities: ' has new activity in' # modified by bai
label_new_activity: ' has new activity in'
label_i_new_activity: ' have new activity in'

View File

@ -1389,6 +1389,7 @@ zh:
label_leave_me_message: 给我留言了
label_leave_others_message: 给他留言了
label_leave_a_message: 给他(她)留言
label_leave_your_message: 给你留言了
label_new_activity: 有了最新动态
label_create_project: 参与了
label_praise: