Sha256: a6bcb786a7537e179f040155e99be0f08ad3ccb166889fb64c6fd8ef342e8626

Contents?: true

Size: 486 Bytes

Versions: 8

Compression:

Stored size: 486 Bytes

Contents

class Dorsale::BillingMachine::InvoiceMailer < ::Dorsale::ApplicationMailer
  def send_invoice_to_customer(invoice, subject, body, sender = nil)
    return false if invoice.try(:customer).try(:email).blank?

    attachments["#{invoice.t}_#{invoice.tracking_id}.pdf"] = invoice.to_pdf

    mail(
      :to       => invoice.customer.email,
      :cc       => sender.try(:email),
      :reply_to => sender.try(:email),
      :subject  => subject,
      :body     => body,
    )
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dorsale-3.1.7 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.6 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.5 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.4 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.3 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.2 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.1 app/mailers/dorsale/billing_machine/invoice_mailer.rb
dorsale-3.1.0 app/mailers/dorsale/billing_machine/invoice_mailer.rb