下面是我的 Notifer 的代码,其中@email包含收件人,发件人,邮件主题等信息: class Notifier < ActionMailer::Base default :from => "[email protected]"
def email(email)
@email = email
mail(:from => @email.sender, :to => @email.reciever, :cc => @email.sender, :subject => @email.title)
end
end
根据官方的文档添加 from 就可以设置发件人的地址,可是不成功。怎么办啊。求 DX~~~