Ruby on Rails
Wednesday, February 18, 2015
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: "myemailid@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-reply@impactinstitute.org>"
def welcome_confirmation(email)
@email = email
mail(:to => "#{email}", :subject => "Welcome to www.impactinstitute.org!")
end
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/0ff1886b-0969-47da-b291-44d6e792100a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment