Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added that deliver_* will now return the email that was sent

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 9357321946f5fdef6a4e1424d2b5d83acf03dfdb 1 parent a263612
@dhh dhh authored
View
2  actionmailer/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added that deliver_* will now return the email that was sent
+
* Fixed quoting for all address headers, not just to #955 [Jamis Buck]
* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
View
9 actionmailer/lib/action_mailer/base.rb
@@ -111,15 +111,11 @@ def method_missing(method_symbol, *parameters)#:nodoc:
end
end
- def mail(to, subject, body, from, timestamp = nil, headers = {},
- charset = @@default_charset
- ) #:nodoc:
+ def mail(to, subject, body, from, timestamp = nil, headers = {}, charset = @@default_charset) #:nodoc:
deliver(create(to, subject, body, from, timestamp, headers, charset))
end
- def create(to, subject, body, from, timestamp = nil, headers = {},
- charset = @@default_charset
- ) #:nodoc:
+ def create(to, subject, body, from, timestamp = nil, headers = {}, charset = @@default_charset) #:nodoc:
m = TMail::Mail.new
m.body = body
m.subject, = quote_any_if_necessary(charset, subject)
@@ -139,6 +135,7 @@ def create(to, subject, body, from, timestamp = nil, headers = {},
def deliver(mail) #:nodoc:
logger.info "Sent mail:\n #{mail.encoded}" unless logger.nil?
send("perform_delivery_#{delivery_method}", mail) if perform_deliveries
+ return mail
end
def quoted_printable(text, charset)#:nodoc:
Please sign in to comment.
Something went wrong with that request. Please try again.