Ruby on Rails
Friday, February 14, 2014
On Friday, February 14, 2014 5:12:22 AM UTC-6, daynthan kabilan wrote:
Hi Friends,how to add current user's email address for sender email using actionmailer.examplemail(:to => user.email, :subject => "Thank you.", :from => "a...@gmail.com")
Would you happen to be using Devise? If so, there is a current_user helper for accessing the user that is currently logged in.
def thanks_messagemail to: user.email, subject: "Thank you.", from: current_user.email
end
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b253133d-e2b0-4012-be6a-c359fe1c9865%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment