Go back to the main page

A sender (Return-Path, Sender or From) is required to send a message" error when upgrading from Rails 3.1 to 3.2

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

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

Comment on this article?