class General < ActionMailer::Base
  default :from => "ballalama <ballalama.reaumont@orange.fr>"
  self.default_url_options = {:host => HOSTNAME}

 
  def send_newsletter(email,newsletter )
    @newsletter = newsletter
   if email.kind_of?(String)
		email = email
	else
		@registrant = email
		email = email.email

	end
    mail(:to => email, :subject => @newsletter.subject) do |format|
        format.html { render :action => "send_newsletter"}
      end
  end
  
	def confirm_email(registrant)
		@registrant = registrant
		
		mail(:to => @registrant.email, :subject => "Confirmation de votre adresse email.") do |format|
			format.html { render :action => "confirm_email"}
		end
		
	end

end
