You’ll need a simple config like this in merb_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 } 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!', :body => partial(:sometemplate) m.deliver!
| Public Attributes | |
|---|---|
| Public Methods | |
|---|---|
| attach | |
| deliver! | |
| net_ |
:plain, :login, or :cram_md5 |
| new | |
| sendmail | |
| test_ |
|
<code/>and<pre/>for code samples.