Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7572: sendmail_just_one_return_path.diff

File sendmail_just_one_return_path.diff, 0.8 kB (added by billkirtley, 8 months ago)

This patch fixes the problem of accumulating return-path specifications

  • actionmailer/lib/action_mailer/base.rb

    old new  
    603603      end 
    604604 
    605605      def perform_delivery_sendmail(mail) 
    606         sendmail_settings[:arguments] += " -f \"#{mail['return-path']}\"" if mail['return-path'] 
    607         IO.popen("#{sendmail_settings[:location]} #{sendmail_settings[:arguments]}","w+") do |sm| 
     606        sendmail_args = sendmail_settings[:arguments] 
     607        sendmail_args += " -f \"#{mail['return-path']}\"" if mail['return-path'] 
     608        IO.popen("#{sendmail_settings[:location]} #{sendmail_args}","w+") do |sm|  
    608609          sm.print(mail.encoded.gsub(/\r/, '')) 
    609610          sm.flush 
    610611        end