Topic: Syntax for :from using Rails 3.1 and Ruby 1.8.7

Hello,  I'm creating an app based on the book Rails 3 in Action and I've run into a problem. In the code below, you'll see the line with the ":from" in "mail()". This part doesn't seem to be working. When an email is delivered it shows the first part "Ticketee", but the part between the < > is being ignored.

This was working with Rails 3.0, but since I switched to Rails 3.1 I can't get this working. Is it a syntax problem? I'm using Rails 3.1 and Ruby 1.8.7. Any ideas?

class Notifier < ActionMailer::Base 
  #default :from => "user@email.com"

  def comment_updated(comment, user) 
    @comment = comment 
    @user = user  
    mail(
    :to => user.email, 
    :from => "Ticketee <ticketee+#{comment.job_id}+#{comment.job_id}@gmail.com>", 
    :subject => "[searcherz] #{comment.job_id}"
    ) 
  end 
end

Last edited by svmartin (2011-09-12 17:38:57)