25 lines
659 B
Ruby
25 lines
659 B
Ruby
class UtilisateurMailer < ActionMailer::Base
|
|
def signup_notification(utilisateur)
|
|
setup_email(utilisateur)
|
|
@subject += 'Please activate your new account'
|
|
|
|
@body[:url] = "http://YOURSITE/activate/#{utilisateur.activation_code}"
|
|
|
|
end
|
|
|
|
def activation(utilisateur)
|
|
setup_email(utilisateur)
|
|
@subject += 'Your account has been activated!'
|
|
@body[:url] = "http://YOURSITE/"
|
|
end
|
|
|
|
protected
|
|
def setup_email(utilisateur)
|
|
@recipients = "#{utilisateur.email}"
|
|
@from = "ADMINEMAIL"
|
|
@subject = "[YOURSITE] "
|
|
@sent_on = Time.now
|
|
@body[:utilisateur] = utilisateur
|
|
end
|
|
end
|