60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# File 'lib/mail/network/delivery_methods/sendmail.rb', line 60
def deliver!(mail)
envelope = Mail::SmtpEnvelope.new(mail)
command = [settings[:location]]
command.concat Array(settings[:arguments])
command.concat [ '-f', envelope.from ] if envelope.from
if destinations = destinations_for(envelope)
command.push '--'
command.concat destinations
end
popen(command) do |io|
io.puts ::Mail::Utilities.binary_unsafe_to_lf(envelope.message)
io.flush
end
end
|