Removed dead code.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12011 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
8ff33ac9f7
commit
a74d55edd9
|
@ -297,31 +297,6 @@ class Mailer < ActionMailer::Base
|
||||||
:subject => 'Redmine test'
|
:subject => 'Redmine test'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Overrides default deliver! method to prevent from sending an email
|
|
||||||
# with no recipient, cc or bcc
|
|
||||||
def deliver!(mail = @mail)
|
|
||||||
set_language_if_valid @initial_language
|
|
||||||
return false if (recipients.nil? || recipients.empty?) &&
|
|
||||||
(cc.nil? || cc.empty?) &&
|
|
||||||
(bcc.nil? || bcc.empty?)
|
|
||||||
|
|
||||||
|
|
||||||
# Log errors when raise_delivery_errors is set to false, Rails does not
|
|
||||||
raise_errors = self.class.raise_delivery_errors
|
|
||||||
self.class.raise_delivery_errors = true
|
|
||||||
begin
|
|
||||||
return super(mail)
|
|
||||||
rescue Exception => e
|
|
||||||
if raise_errors
|
|
||||||
raise e
|
|
||||||
elsif mylogger
|
|
||||||
mylogger.error "The following error occured while sending email notification: \"#{e.message}\". Check your configuration in config/configuration.yml."
|
|
||||||
end
|
|
||||||
ensure
|
|
||||||
self.class.raise_delivery_errors = raise_errors
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Sends reminders to issue assignees
|
# Sends reminders to issue assignees
|
||||||
# Available options:
|
# Available options:
|
||||||
# * :days => how many days in the future to remind about (defaults to 7)
|
# * :days => how many days in the future to remind about (defaults to 7)
|
||||||
|
|
Loading…
Reference in New Issue