我正在使用具有此电子邮件方法的 gem:
#Sends and email for indicating a reply in an already created conversation
def reply_message_email(message,receiver)
@message = message
@receiver = receiver
subject = message.subject.to_s
subject = strip_tags(subject) unless subject.html_safe?
mail(:to => receiver.send(Mailboxer.email_method,message), :subject => t('mailboxer.message_mailer.subject_reply', :subject => subject)) do |format|
format.text {render __method__}
format.html {render __method__}
end
end
end
我在我的语言环境中有这个:
da:
mailboxer:
message_mailer:
subject_reply: You have got a new reply "#{subject}"
而不是覆盖电子邮件方法。不能在 YAML 文件中做一些 ruby 代码吗?现在,电子邮件的主题只是您收到了一个新的回复“#{subject}”作为文本,并且 ruby 代码未激活。