Skip to content

Commit

Permalink
Avoid modifying the sendmail_settings hash when using the return path.
Browse files Browse the repository at this point in the history
…Closes #7572 [billkirtley]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
NZKoz committed Apr 5, 2008
1 parent 097c0d6 commit 77730f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions actionmailer/lib/action_mailer/base.rb
Expand Up @@ -603,8 +603,9 @@ def perform_delivery_smtp(mail)
end

def perform_delivery_sendmail(mail)
sendmail_settings[:arguments] += " -f \"#{mail['return-path']}\"" if mail['return-path']
IO.popen("#{sendmail_settings[:location]} #{sendmail_settings[:arguments]}","w+") do |sm|
sendmail_args = sendmail_settings[:arguments]
sendmail_args += " -f \"#{mail['return-path']}\"" if mail['return-path']
IO.popen("#{sendmail_settings[:location]} #{sendmail_args}","w+") do |sm|
sm.print(mail.encoded.gsub(/\r/, ''))
sm.flush
end
Expand Down

0 comments on commit 77730f7

Please sign in to comment.