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
on 2011-08-16 19:17
on 2011-08-16 19:38
What is the output when you try this:
def password_reset_instructions(user)
@user = user
@url = edit_password_reset_url(user.perishable_token)
p user
mail(:to => user.email, :subject => 'Password Reset for
WaveLineup')
end
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.