Sha256: 17418992fe2cb1e3d91c45bd88f44e8b014c7678c1f5263819f09bc426fd756e

Contents?: true

Size: 1.65 KB

Versions: 9

Compression:

Stored size: 1.65 KB

Contents

= emailer

Emailer is a collection of utility classes for sending emails
using an existing SMTP service. I personally only use it with
AuthSMTP, and it's not been extensively tested. Use at your 
own risk.

Notice that you'll need to install TMail to use emailer. I've
not included it as a dependency as the gem does not currently
install with Ruby 1.9, there are, however, patched versions out 
there.

I apologize in advance for the lack of documentation. There is
little going on in the code, and the interface should be easy
enough for anyone to figure out with a minute to glance at the
code. Here's a taste:

== Basic use

  smtp = Emailer::AuthsmtpFacade.new :username => '[username]', :pasword => '[password]', :domain => 'localhost'
  smtp.open do
    smtp.send_text(
        :from => 'your@email.com',
        :to => 'to@email.com',
        :subject => 'Thanks',
        :body => 'Mail body.'
      )
  end

== Bulk messages

  queue = Emailer::MailQueue.new smtp
  queue.add(
      :from => 'your@email.com',
      :to => 'to@email.com',
      :subject => 'Thanks',
      :body => 'Mail body.'
    ) { |success, mail| puts "Sent mail to #{mail[:to]}..." }
  queue.process

== Note on Patches/Pull Requests
 
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
  future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
  (if you want to have your own version, that is fine but
  bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2009 Erik Hansson. See LICENSE for details.

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
bjornblomqvist-emailer-0.1.4 README.rdoc
bjornblomqvist-emailer-0.1.5 README.rdoc
bjornblomqvist-emailer-0.1.6 README.rdoc
bjornblomqvist-emailer-0.1.7 README.rdoc
bjornblomqvist-emailer-0.1.9 README.rdoc
erikhansson-emailer-0.1.1 README.rdoc
erikhansson-emailer-0.1.2 README.rdoc
erikhansson-emailer-0.1.3 README.rdoc
erikhansson-emailer-0.1.4 README.rdoc