class General < ActionMailer::Base default :from => "Jipe " self.default_url_options = {:host => HOSTNAME} layout "mail2" def confirm_email(registrant) @registrant = registrant @lang_site = @registrant.lang_site if @lang_site.id == 2 @title = "Confirmation of your email address." else @title = "Confirmation de votre adresse email." end mail(:to => @registrant.email, :subject => @title) do |format| format.html { if @lang_site.id == 2 render :action => "en_confirm_email" else render :action => "fr_confirm_email" end } end end end