Methods

Class Index [+]

Quicksearch

Mail::Exim

A delivery method implementation which sends via exim.

To use this, first find out where the exim binary is on your computer, if you are on a mac or unix box, it is usually in /usr/sbin/exim, this will be your exim location.

  Mail.defaults do
    delivery_method :exim
  end

Or if your exim binary is not at ‘/usr/sbin/exim‘

  Mail.defaults do
    delivery_method :exim, :location => '/absolute/path/to/your/exim'
  end

Then just deliver the email as normal:

  Mail.deliver do
    to 'mikel@test.lindsaar.net'
    from 'ada@test.lindsaar.net'
    subject 'testing exim'
    body 'testing exim'
  end

Or by calling deliver on a Mail message

  mail = Mail.new do
    to 'mikel@test.lindsaar.net'
    from 'ada@test.lindsaar.net'
    subject 'testing exim'
    body 'testing exim'
  end

  mail.deliver!

Public Class Methods

call(path, arguments, mail) click to toggle source
    # File lib/mail/network/delivery_methods/exim.rb, line 45
45:     def self.call(path, arguments, mail)
46:       IO.popen("#{path} #{arguments}", "w+") do |io|
47:         io.puts mail.encoded.to_lf
48:         io.flush
49:       end
50:     end
new(values) click to toggle source
    # File lib/mail/network/delivery_methods/exim.rb, line 40
40:     def initialize(values)
41:       self.settings = { :location       => '/usr/sbin/exim',
42:                         :arguments      => '-i -t' }.merge(values)
43:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.