Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Kiesel <james.kiesel@gmail.com>2014-12-27 15:44:53 +0300
committerJames Kiesel <james.kiesel@gmail.com>2015-01-14 14:20:19 +0300
commit1c69dd77529903713bf16f2ad0a41b386aa172da (patch)
treeb0999e6b1cf64af23d911c32ce4642066b732147 /app/mailers
parente5d725a6041b2b6503f44a8f15940913a732d9ad (diff)
Add contacts/posts, and GZipping JSON exporter output
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/export_mailer.rb22
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