Simple send-mail extention for Sinatra
Ruby
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
lib/sinatra first commit. Oct 24, 2009
spec
.document
.gitignore Initial commit to sinatra-send_mail. Oct 24, 2009
LICENSE Initial commit to sinatra-send_mail. Oct 24, 2009
README.rdoc Delete obsolete example. Oct 25, 2009
Rakefile
VERSION
sinatra-send_mail.gemspec

README.rdoc

sinatra-send_mail

sinatra-send_mail is an extension for Sinatra to send e-mail using smtp.

usage:

send_mail(from, to, subject, body, opts)

    from:     sender's address.
    to:       recipient's address.
    subject:  subject of message.
    body:     body of message.
              You can use erb like: erb(:source)
    opts:     options(see below).

  Options:
    content_type: content_type of message.
    extra_header: additional heder.
    account, password, authtype:
                  options for SMTP Authentication.

Example

require 'rubygems'
require 'sinatra'
require 'sinatra/send_mail'

set :smtp_server 'Your SMTP Server'
set :smtp_locale 'Your locale'        # 'ja_JP' or ''

get '/' do
  send_mail('foo@example.com', 'bar@example.com',
            'test', 'Hello!!')
end

Copyright

Copyright © 2009 Hideki SAKAMOTO. See LICENSE for details.