lib/action_mailer/base.rb in actionmailer-4.0.3 vs lib/action_mailer/base.rb in actionmailer-4.0.4.rc1
- old
+ new
@@ -659,9 +659,11 @@
# format.text(content_transfer_encoding: "base64")
# format.html
# end
#
def mail(headers = {}, &block)
+ return @_message if @_mail_was_called && headers.blank? && !block
+
@_mail_was_called = true
m = @_message
# At the beginning, do not consider class default for content_type
content_type = headers[:content_type]