# -*- encoding : utf-8 -*-
class SponsorshipAnimalMails < ActionMailer::Base
  layout 'mail2'
  
  default from: "Jipe <contact@jipe.fr>"



  def general(lang, partial, donate_transaction, options = {})
    @options = options
    
    @partial = partial
    @donator_transaction = donate_transaction
    @email = @donator_transaction.particular_bill.email
    @lang_slug = @donator_transaction.lang_site.slug
    
    if @donator_transaction.lang_site_id == 2
      @title = "Merci pour votre promesse de parrainage."
    else
      @title = "Merci pour votre promesse de parrainage."
    end
    
    @sponsorship_animal = @donator_transaction.transaction_items[0].transaction_content.sponsorship_animal
    
    
    mail(:to => @email, :subject => @title)
  end

  def confirmation_pa(donate_transaction, options = {})
    @options = options
    @donate_transaction = donate_transaction
    @email = @donate_transaction.particular_bill.email
    @title = "Merci pour votre promesse de parrainage."
    mail(:to => @email, :subject => @title)
  end
  
  def confirmation_cheque(donate_transaction, options = {})
    @options = options
    @donate_transaction = donate_transaction
    @email = @donate_transaction.particular_bill.email
    @title = "Merci pour votre promesse de parrainage."
    mail(:to => @email, :subject => @title)
  end
  
  def confirmation_cb(donate_transaction, options = {})
    @options = options
    @donate_transaction = donate_transaction
    @email = @donate_transaction.particular_bill.email
    @title = "Merci pour votre parrainage."
    mail(:to => @email, :subject => @title)
  end
  
  def confirmation_cb_rec(donate_transaction, options = {})
    @options = options
    @donate_transaction = donate_transaction
    @email = @donate_transaction.particular_bill.email
    @title = "Merci pour votre parrainage mensuel."
    mail(:to => @email, :subject => @title)
  end


  
  
  
end
