You‘ll need a simple config like this in init.rb if you want to
actually send mail:
Merb::Mailer.config = {
:host => 'smtp.yourserver.com',
:port => '25',
:user => 'user',
:pass => 'pass',
:auth => :plain # :plain, :login, :cram_md5, the default is no auth
:domain => "localhost.localdomain" # the HELO domain provided by the client to the server
}
or
Merb::Mailer.config = {:sendmail_path => '/somewhere/odd'}
Merb::Mailer.delivery_method = :sendmail
You could send mail manually like this (but it‘s better to use a MailController instead).
m = Merb::Mailer.new :to => 'foo@bar.com',
:from => 'bar@foo.com',
:subject => 'Welcome to whatever!',
:html => partial(:sometemplate)
m.deliver!
You can use :text option to specify plain text email body and :html for
HTML email body.