Rescue from an exception when sending emails in podmin:admin_email
This commit is contained in:
parent
a4eafe8a87
commit
d0b37fa7ee
1 changed files with 8 additions and 4 deletions
|
|
@ -16,10 +16,14 @@ namespace :podmin do
|
|||
mails = Notifier.admin(msg.html_safe, users, :subject => args[:subject])
|
||||
count = 0
|
||||
mails.each do |mail|
|
||||
mail.deliver
|
||||
count += 1
|
||||
if count % 100 == 0
|
||||
puts "#{count} out of #{mails.count} delivered"
|
||||
begin
|
||||
mail.deliver
|
||||
count += 1
|
||||
if count % 100 == 0
|
||||
puts "#{count} out of #{mails.count} delivered"
|
||||
end
|
||||
rescue
|
||||
puts $!, $@
|
||||
end
|
||||
end
|
||||
puts "#{count} out of #{mails.count} delivered"
|
||||
|
|
|
|||
Loading…
Reference in a new issue