Skip to content

Commit

Permalink
Fix Mail::Exim, forgotten in 4875bc2
Browse files Browse the repository at this point in the history
The parameters of Mail::Sendmail.call changed in 4875bc2 but
Mail::Exim was not changed accordingly.

Fixes #689
  • Loading branch information
jethrogb authored and jeremy committed May 17, 2017
1 parent e5dc67c commit cc46925
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Bugs:
* #539 - Fix that whitespace-only continued headers would be incorrectly parsed as the break between headers and body. (ConradIrwin)
* #605 - Fix Mail::Address#name for nil addresses (peterkovacs)
* #684 - Fix recursively fetching attachments from an embedded message/rfc822 part whose Content-Type header has additional parameters. (vongruenigen)
* #689 - Fix Exim delivery method broken by #477 in 2.5.4. (jethrogb)
* #792 - Allow blank filenames in Content-Disposition field. (robinroestenburg)
* #876 - Strip valid RFC-1342 separator characters between non-matching encoded-words (Caleb W. Corliss)
* #876 - Fix that Mail::Message#add_file was adding a stray filename header (kirikak2)
Expand Down
16 changes: 6 additions & 10 deletions lib/mail/network/delivery_methods/exim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ module Mail
#
# mail.deliver!
class Exim < Sendmail
def initialize(values)
self.settings = { :location => '/usr/sbin/exim',
:arguments => '-i -t' }.merge(values)
end
DEFAULTS = {
:location => '/usr/sbin/exim',
:arguments => '-i -t'
}

def self.call(path, arguments, destinations, mail)
popen "#{path} #{arguments}" do |io|
io.puts ::Mail::Utilities.to_lf(mail.encoded)
io.flush
end
def self.call(path, arguments, destinations, encoded_message)
super path, arguments, nil, encoded_message
end

end
end
8 changes: 6 additions & 2 deletions lib/mail/network/delivery_methods/sendmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,15 @@ module Mail
#
# mail.deliver!
class Sendmail
DEFAULTS = {
:location => '/usr/sbin/sendmail',
:arguments => '-i'
}

attr_accessor :settings

def initialize(values)
self.settings = { :location => '/usr/sbin/sendmail',
:arguments => '-i' }.merge(values)
self.settings = self.class::DEFAULTS.merge(values)
end

def deliver!(mail)
Expand Down

0 comments on commit cc46925

Please sign in to comment.