module Mail

def self.defaults(&block)

mail.delivery_method :smtp, :address => 'some.host'

Or you can override the method and pass in settings:

mail.delivery_method :smtp

a per email basis, you can override the method:
Each mail object inherits the default set in Mail.delivery_method, however, on

Mail.retriever_method.new #=> Mail::POP3 instance
Mail.delivery_method.new #=> Mail::SMTP instance

end
:enable_ssl => true }
:password => nil,
:user_name => nil,
:port => 995,
retriever_method :pop3, { :address => "localhost",

:enable_starttls_auto => true }
:authentication => nil,
:password => nil,
:user_name => nil,
:domain => 'localhost.localdomain',
:port => 25,
delivery_method :smtp, { :address => "localhost",
Mail.defaults do

every new mail object:
If you do not specify anything, you will get the following equivalent code set in

end
body 'this is a body'
subject 'hi there!'
from 'bob@test.lindsaar.net'
to 'mikel@test.lindsaar.net'
Mail.deliver do

as easy as:
So sending a new email, if you have an SMTP server running on localhost is

set.
The delivery_method and retriever_method default to :smtp and :pop3, with defaults
Sets the default delivery method and retriever method for all new Mail objects.
def self.defaults(&block)
  Configuration.instance.instance_eval(&block)
end