welcome mailer not working properly,mail is going every time a user logs in to site

10 views
Skip to first unread message

Sailatha Kashamoni

unread,
Feb 18, 2015, 8:51:23 AM2/18/15
to rubyonra...@googlegroups.com
welcome mail is going every time a user logs in to site,i only want it to go once when user signed up

app/controllers/user_mailer.rb--

class UserMailer < ActionMailer::Base
  default from: "myem...@gmail.com"
  def registration_confirmation(user)
   
UserMailer.registration_confirmation(@user).deliver
  end
end 

app/mailers/welcome_mailer.rb--

class WelcomeMailer < ActionMailer::Base
  default from: " Impact Institute (alert) <no-r...@impactinstitute.org>"
  
  def welcome_confirmation(email)
    @email = email
    mail(:to => "#{email}", :subject => "Welcome to www.impactinstitute.org!")
  end
end

Reply all
Reply to author
Forward
0 new messages