mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Add test emails
This commit is contained in:
parent
49be49ea63
commit
fc9b8f6ef4
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,10 @@
|
|||
class InvoiceMailer < ApplicationMailer
|
||||
def invoice_email(invoice, pdf)
|
||||
unless Rails.env.production?
|
||||
test_emails = ['martin@gitlab.eu', 'priit@gitlab.eu']
|
||||
return unless test_emails.include?(invoice.billing_email)
|
||||
end
|
||||
|
||||
attachments[invoice.pdf_name] = pdf
|
||||
mail(to: invoice.billing_email, subject: invoice)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue