Mailer failure: ArgumentError: A sender (Return-Path, Sender or From) required to send a message

I have two mailer procedures in the same app and same mailer (Rails 3.1/1.9.2). The first one fails with the message below, the second works fine. Both these results are through irb. Anyone have an idea as to why? Also, in my application.rb I do have: ActionMailer::Base.default :from => “WaveLineup system@wavelineup.com” defined.

FAILS

def password_reset_instructions(user)

@user = user

@url = edit_password_reset_url(user.perishable_token)

mail(:to => user.email, :subject => ‘Password Reset for WaveLineup’)

end

Error message:

ruby-1.9.2-p290 :010 > SystemMailer.password_reset_instructions(user).deliver

ArgumentError: A sender (Return-Path, Sender or From) required to send a message

WORKS FINE

def wavelineup_invitation(invitation)

@referring_user = invitation.referring_user

@token = invitation.token

mail(:to => invitation.email, :subject => ‘Invitation to WaveLineup Travel Card System for Network practitioners’)

end

What is the output when you try this:

  def password_reset_instructions(user)       @user = user       p @user       @url = edit_password_reset_url(user.perishable_token)       mail(:to => user.email, :subject => 'Password Reset for WaveLineup')   end

What is the output when you try this:

def password_reset_instructions(user)

  @user = user

p @user @url = edit_password_reset_url(user.perishable_token)

  mail(:to => user.email, :subject => 'Password Reset for

WaveLineup’)

end

Thanks… actually I just honed in on the next line starting with @url… This is where it is failing. Turns out it was that I was missing the default app host in my development.rb file. What wasted all this time is that the error message seemingly was not the cause of the problem or even accurate… I know better now but usually ruby/rails messages are more accurate.