Sender Email

Hi Friends,

how to add current user’s email address for sender email using actionmailer.

example

mail(:to => user.email, :subject => “Thank you.”, :from => “abc@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_message**

  mail to: user.email, subject: "Thank you.", from: current_user.email

 end

Al

Thanks for your reply,

i want to add current user’s email address in our default :from in user mailer