A sender (Return-Path, Sender or From) is required to send a message" error when upgrading from Rails 3.1 to 3.2
Code like this will no longer work in Rails 3.2
# DOESN'T WORK in RAILS 3.2
def invite(*args)
@from = generic_from
@subject = "You are being invited to join the #{a.first.capitalize} list"
@recipients = a.second
@body = a.third
@list = a.first
end
# DOES WORK in RAILS 3.2
def invite(*args)
from = generic_from
subject = "You are being invited to join the #{a.first.capitalize} list"
recipients = a.second
@body = a.third
@list = a.first
mail from: from, to: recipients, subject: subject
end
- Pushed on 06/02/2012 by Christian
