wildbit / postmark-gem

Ruby gem for sending emails through http://postmarkapp.com HTTP API

This URL has Read+Write access

underlog (author)
Wed Nov 04 07:58:14 -0800 2009
commit  f674148b003ee1822f335daf0d8416e49b6b37aa
tree    5c0819ae84fe9de60b60d9058c3cb5597212d259
parent  f2a52aa0d501363b1bc8c025300ad31a90970868
name age message
file .document Wed Nov 04 01:57:09 -0800 2009 Initial commit to postmark. [underlog]
file .gitignore Wed Nov 04 01:57:09 -0800 2009 Initial commit to postmark. [underlog]
file LICENSE Wed Nov 04 01:57:09 -0800 2009 Initial commit to postmark. [underlog]
file README.rdoc Loading commit data...
file Rakefile
file VERSION
directory features/ Wed Nov 04 07:31:50 -0800 2009 Initial implementation. [underlog]
directory lib/
file postmark.gemspec
directory spec/ Wed Nov 04 07:31:50 -0800 2009 Initial implementation. [underlog]
README.rdoc

Postmark gem

Ruby gem for sending emails through postmarkapp.com HTTP API

Example

    #!/usr/bin/env ruby

    require 'rubygems'
    require 'postmark'
    require 'tmail'

    Postmark.api_key = "your-api-key"

    message = TMail::Mail.new
    message.from = "leonard@bigbangtheory.com"
    message.to = "Sheldon Cooper, Ph.D. <sheldon@bigbangtheory.com>"
    message.subject = "Hi Sheldon!"
    message.content_type = "text/html"
    message.body = "Hello my friend!"

    p Postmark.send_through_postmark(message).body

Requirements

The gem relies on TMail for building the message. You will also need postmark account, server and sender signature set up to use it. If you plan using it in a rails project, check out the postmark-rails gem, which is meant to integrate with ActionMailer.

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.
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright © 2009 Wildbit LLC. See LICENSE for details.