该错误似乎非常不具描述性:
failed with ArgumentError: A sender (Return-Path, Sender or From) required to send a message
我认为这不是真正的问题,因为即使我设置了默认值,我也尝试指定“来自”。此外,localhost 和 Heroku 的代码是相同的...
def invite_dealer(auction, name, email, dealer)
return false if dealer.bids.where("auction_id = ?", auction.id).present?
@name = name #used on template
@email = email
@auction = auction #this too
mail(:to => @email, :subject => "New Auction - #{auction.car.name}", :from => "realaddressishereonmymachine@ourdomain.com")
end