[Logilogi-svn] SF.net SVN: logilogi:[1654] trunk
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2009-12-14 17:59:59
|
Revision: 1654
http://logilogi.svn.sourceforge.net/logilogi/?rev=1654&view=rev
Author: wybow
Date: 2009-12-14 17:59:49 +0000 (Mon, 14 Dec 2009)
Log Message:
-----------
Applied monkey-patch for action-mailer
Modified Paths:
--------------
trunk/app/models/user.rb
Added Paths:
-----------
trunk/config/initializers/action_mailer.rb
Modified: trunk/app/models/user.rb
===================================================================
--- trunk/app/models/user.rb 2009-12-11 22:55:47 UTC (rev 1653)
+++ trunk/app/models/user.rb 2009-12-14 17:59:49 UTC (rev 1654)
@@ -74,7 +74,7 @@
validates_presence_of :email
validates_uniqueness_of :email
validates_format_of :email, :with => /^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\._-]+\.[A-Za-z]+$/,
- :message => "is incorrect, please check for typo's"
+ :message => "is incorrect, please check for typos"
validates_uniqueness_of :openid_identifier, :allow_blank => true
validates_length_of :password, :minimum => 6, :on => :create, :allow_nil => true
Added: trunk/config/initializers/action_mailer.rb
===================================================================
--- trunk/config/initializers/action_mailer.rb (rev 0)
+++ trunk/config/initializers/action_mailer.rb 2009-12-14 17:59:49 UTC (rev 1654)
@@ -0,0 +1,19 @@
+# TODO remove if rails bug fixed
+# https://rails.lighthouseapp.com/projects/8994/tickets/2340-action-mailer-cant-deliver-mail-via-smtp-on-ruby-191
+
+module ActionMailer
+ class Base
+ def perform_delivery_smtp(mail)
+ destinations = mail.destinations
+ mail.ready_to_send
+ sender = (mail['return-path'] && mail['return-path'].spec) || Array(mail.from).first
+
+ 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.start(smtp_settings[:domain], smtp_settings[:user_name], smtp_settings[:password],
+ smtp_settings[:authentication]) do |smtp|
+ smtp.sendmail(mail.encoded, sender, destinations)
+ end
+ end
+ end
+end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|