diff options
author | James Kiesel <james.kiesel@gmail.com> | 2014-12-27 15:44:53 +0300 |
---|---|---|
committer | James Kiesel <james.kiesel@gmail.com> | 2015-01-14 14:20:19 +0300 |
commit | 1c69dd77529903713bf16f2ad0a41b386aa172da (patch) | |
tree | b0999e6b1cf64af23d911c32ce4642066b732147 /app/mailers | |
parent | e5d725a6041b2b6503f44a8f15940913a732d9ad (diff) |
Add contacts/posts, and GZipping JSON exporter output
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/export_mailer.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/mailers/export_mailer.rb b/app/mailers/export_mailer.rb new file mode 100644 index 000000000..8559fa8b1 --- /dev/null +++ b/app/mailers/export_mailer.rb @@ -0,0 +1,22 @@ +class ExportMailer < ActionMailer::Base + default from: AppConfig.mail.sender_address + + def export_complete_for(user) + @user = user + + mail(to: @user.email, subject: I18n.t('notifier.export_email.subject')) do |format| + format.html { render 'users/export_email' } + format.text { render 'users/export_email' } + end.deliver + end + + def export_failure_for(user) + @user = user + + mail(to: @user.email, subject: I18n.t('notifier.export_failure_email.subject')) do |format| + format.html { render 'users/export_failure_email' } + format.text { render 'users/export_failure_email' } + end.deliver + end + +end |