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:
authorIlya Zhitomirskiy <iz268@nyu.edu>2011-10-27 03:27:28 +0400
committerIlya Zhitomirskiy <iz268@nyu.edu>2011-10-27 03:35:20 +0400
commit53b27a76279dec2b1b4519b88ab83f86b22892a8 (patch)
tree77eab863118fec4659cc50be8db22dc96e984872 /app/mailers
parent7e738651474582417f967ae690bb868fe90f6a1f (diff)
added a rake task to email retention to admins
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notifier.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb
index bee70b83f..30d58056b 100644
--- a/app/mailers/notifier.rb
+++ b/app/mailers/notifier.rb
@@ -6,17 +6,23 @@ class Notifier < ActionMailer::Base
def self.admin(string, recipients, opts = {})
mails = []
recipients.each do |rec|
- mail = single_admin(string, rec)
+ mail = single_admin(string, rec, opts)
mails << mail
end
mails
end
- def single_admin(string, recipient)
+ def single_admin(string, recipient, opts={})
@receiver = recipient
@string = string.html_safe
- mail(:to => @receiver.email,
- :subject => I18n.t('notifier.single_admin.subject'), :host => AppConfig[:pod_uri].host)
+
+ default_opts = {:to => @receiver.email,
+ :from => AppConfig[:smtp_sender_address],
+ :subject => I18n.t('notifier.single_admin.subject'), :host => AppConfig[:pod_uri].host}
+ default_opts.merge!(opts)
+
+
+ mail(default_opts)
end
def started_sharing(recipient_id, sender_id)
@@ -63,4 +69,4 @@ class Notifier < ActionMailer::Base
def with_recipient_locale(&block)
I18n.with_locale(@notification.recipient.language, &block)
end
-end \ No newline at end of file
+end