aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-02-02 05:32:15 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-02-02 05:32:15 +0000
commitfbd3eb7142e2ac51b230ab2fff83feb800e1b50c (patch)
tree54fbd379c58b2425a5e0e68c8ba6e636452bcd46 /actionmailer/lib
parent5bbc461fcbe18b0ab69c459a94cf0b58f5a4e6b9 (diff)
downloadrails-fbd3eb7142e2ac51b230ab2fff83feb800e1b50c.tar.gz
rails-fbd3eb7142e2ac51b230ab2fff83feb800e1b50c.tar.bz2
rails-fbd3eb7142e2ac51b230ab2fff83feb800e1b50c.zip
Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. Closes #8000.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 2da3679206..ab3ca7f1be 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -468,7 +468,10 @@ module ActionMailer #:nodoc:
# no alternate has been given as the parameter, this will fail.
def deliver!(mail = @mail)
raise "no mail object available for delivery!" unless mail
- logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
+ unless logger.nil?
+ logger.info "Sent mail to #{recipients.to_a.join(', ')}"
+ logger.debug "\n#{mail.encoded}"
+ end
begin
__send__("perform_delivery_#{delivery_method}", mail) if perform_deliveries