From 5b0c8a1266016c6418555399da83fbc7210c6734 Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Fri, 15 Jan 2010 20:03:45 +1100 Subject: Removing internal delivery agents --- .../lib/action_mailer/delivery_method/smtp.rb | 30 ---------------------- 1 file changed, 30 deletions(-) delete mode 100644 actionmailer/lib/action_mailer/delivery_method/smtp.rb (limited to 'actionmailer/lib/action_mailer/delivery_method/smtp.rb') diff --git a/actionmailer/lib/action_mailer/delivery_method/smtp.rb b/actionmailer/lib/action_mailer/delivery_method/smtp.rb deleted file mode 100644 index af30c498b5..0000000000 --- a/actionmailer/lib/action_mailer/delivery_method/smtp.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'net/smtp' - -module ActionMailer - module DeliveryMethod - # A delivery method implementation which sends via smtp. - class Smtp < Method - self.settings = { - :address => "localhost", - :port => 25, - :domain => 'localhost.localdomain', - :user_name => nil, - :password => nil, - :authentication => nil, - :enable_starttls_auto => true, - } - - def perform_delivery(mail) - destinations = mail.destinations - sender = (mail['return-path'] && mail['return-path'].address) || mail['from'] - - smtp = Net::SMTP.new(settings[:address], settings[:port]) - smtp.enable_starttls_auto if settings[:enable_starttls_auto] && smtp.respond_to?(:enable_starttls_auto) - smtp.start(settings[:domain], settings[:user_name], settings[:password], - settings[:authentication]) do |smtp| - smtp.sendmail(mail.encoded, sender, destinations) - end - end - end - end -end -- cgit v1.2.3