Compare commits

...

4 Commits

Author SHA1 Message Date
Jeff McDonald
f6a957122a Add support for SMTP directly over SSL 2014-04-17 21:26:03 -07:00
Dirkjan Bussink
7c3d4ec43c Bump version 2014-03-31 13:43:08 +02:00
Dirkjan Bussink
7343ed7b05 Merge pull request #53 from github/dbussink/no-toplevel-exception-rescue
We shouldn't try to rescue every type of exception here
2014-03-31 11:42:02 +00:00
Dirkjan Bussink
2a70c9691d We shouldn't try to rescue every type of exception here 2014-03-31 13:35:28 +02:00
3 changed files with 5 additions and 8 deletions

View File

@@ -1 +1 @@
2.3.14.github41
2.3.14.github42

View File

@@ -248,6 +248,7 @@ module ActionMailer #:nodoc:
# This is a symbol and one of <tt>:plain</tt>, <tt>:login</tt>, <tt>:cram_md5</tt>.
# * <tt>:enable_starttls_auto</tt> - When set to true, detects if STARTTLS is enabled in your SMTP server and starts to use it.
# It works only on Ruby >= 1.8.7 and Ruby >= 1.9. Default is true.
# * <tt>:enable_tls</tt> - When set to true, enables SMTP directly over SSL/TLS. Default is false.
#
# * <tt>sendmail_settings</tt> - Allows you to override options for the <tt>:sendmail</tt> delivery method.
# * <tt>:location</tt> - The location of the sendmail executable. Defaults to <tt>/usr/sbin/sendmail</tt>.
@@ -299,6 +300,7 @@ module ActionMailer #:nodoc:
:password => nil,
:authentication => nil,
:enable_starttls_auto => true,
:enable_tls => false,
}
cattr_accessor :smtp_settings
@@ -712,6 +714,7 @@ module ActionMailer #:nodoc:
smtp = Net::SMTP.new(smtp_settings[:address], smtp_settings[:port])
smtp.enable_starttls_auto if smtp_settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto)
smtp.enable_tls if smtp_settings[:enable_tls] && smtp.respond_to?(:enable_tls)
smtp.start(smtp_settings[:domain], smtp_settings[:user_name], smtp_settings[:password],
smtp_settings[:authentication]) do |smtp|
smtp.sendmail(mail.encoded, sender, destinations)

View File

@@ -214,13 +214,7 @@ module ActiveRecord
log_info(sql, name, 0)
nil
end
rescue SystemExit, SignalException, NoMemoryError => e
# Don't re-wrap these exceptions. They are probably not being caused by invalid
# sql, but rather some external stimulus beyond the responsibilty of this code.
# Additionaly, wrapping these exceptions with StatementInvalid would lead to
# meaningful loss of data, such as losing SystemExit#status.
raise e
rescue Exception => e
rescue => e
# Log message and raise exception.
# Set last_verification to 0, so that connection gets verified
# upon reentering the request loop