Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

smtp send problems on Ruby 1.9.1 #5

Closed
jberkel opened this issue Feb 17, 2010 · 1 comment
Closed

smtp send problems on Ruby 1.9.1 #5

jberkel opened this issue Feb 17, 2010 · 1 comment
Assignees
Milestone

Comments

@jberkel
Copy link

jberkel commented Feb 17, 2010

need to monkey patch rails (fixed in 2.3.6)

cf https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2340-action-mailer-cant-deliver-mail-via-smtp-on-ruby-191#ticket-2340-3

  module ActionMailer
    class Base
      private

      def perform_delivery_smtp(mail)
        destinations = mail.destinations
        mail.ready_to_send
        sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']

        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
@ghost ghost assigned bguthrie May 31, 2011
@bguthrie
Copy link
Contributor

Many apologies for the ridiculously late resolution. This has been resolved, and the existing monkey patch eliminated, as part of the upgrade to Rails 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants