##// END OF EJS Templates
Do not send an email with no recipient, cc or bcc (closes #743)....
Jean-Philippe Lang -
r1160:8531e176aab6
parent child
Show More
@@ -122,7 +122,16 class Mailer < ActionMailer::Base
122 subject 'Redmine test'
122 subject 'Redmine test'
123 body :url => url_for(:controller => 'welcome')
123 body :url => url_for(:controller => 'welcome')
124 end
124 end
125
125
126 # Overrides default deliver! method to prevent from sending an email
127 # with no recipient, cc or bcc
128 def deliver!(mail = @mail)
129 return false if (recipients.nil? || recipients.empty?) &&
130 (cc.nil? || cc.empty?) &&
131 (bcc.nil? || bcc.empty?)
132 super
133 end
134
126 private
135 private
127 def initialize_defaults(method_name)
136 def initialize_defaults(method_name)
128 super
137 super
General Comments 0
You need to be logged in to leave comments. Login now