David Kahn
2011-Aug-16 17:16 UTC
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-+T6PWOEcvEy41k5uCYKmRQ@public.gmane.org>" 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
7stud --
2011-Aug-16 17:38 UTC
Mailer failure: ArgumentError: A sender (Return-Path, Sender or From) required to send a message
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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David Kahn
2011-Aug-16 19:17 UTC
Mailer failure: ArgumentError: A sender (Return-Path, Sender or From) required to send a message
On Tue, Aug 16, 2011 at 1:38 PM, 7stud -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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.> -- > > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Seemingly Similar Threads
- NoMethodError: undefined method `password_reset_instructions' for UserNotifier:Class
- nested forms and attr_accessable
- AuthLogic Question - one time password (persistence_token) - what config is required to use this???
- Cucumber+Capybara rails 3 issue (Don't know where exactly)
- Testing arbitrary post action parameters