class Mail::Exim
mail.deliver!
end
body ‘testing exim’
subject ‘testing exim’
from ‘ada@test.lindsaar.net’
to ‘mikel@test.lindsaar.net’
mail = Mail.new do
Or by calling deliver on a Mail message
end
body ‘testing exim’
subject ‘testing exim’
from ‘ada@test.lindsaar.net’
to ‘mikel@test.lindsaar.net’
Mail.deliver do
Then just deliver the email as normal:
end
delivery_method :exim, :location => ‘/absolute/path/to/your/exim’
Mail.defaults do
Or if your exim binary is not at ‘/usr/sbin/exim’
end
delivery_method :exim
Mail.defaults do
be your exim location.
if you are on a mac or unix box, it is usually in /usr/sbin/exim, this will
To use this, first find out where the exim binary is on your computer,
A delivery method implementation which sends via exim.
def self.call(path, arguments, destinations, mail)
def self.call(path, arguments, destinations, mail) popen "#{path} #{arguments}" do |io| io.puts mail.encoded.to_lf io.flush end end
def initialize(values)
def initialize(values) self.settings = { :location => '/usr/sbin/exim', :arguments => '-i -t' }.merge(values) end