Sha256: f0d68b084bef8142a422fadcd20d33db2534f83eed8a62f231cc57ee310178b4
Contents?: true
Size: 1.9 KB
Versions: 1
Compression:
Stored size: 1.9 KB
Contents
= Postmark gem Ruby gem for sending emails through http://postmarkapp.com HTTP API == Install The gem is hosted at gemcutter. If you don't have it, install it first: sudo gem install gemcutter gem tumble Then sudo gem install postmark == Example #!/usr/bin/env ruby require 'rubygems' require 'postmark' require 'tmail' Postmark.api_key = "your-api-key" message = TMail::Mail.new # make sure you have a sender signature with that email message.from = "leonard@bigbangtheory.com" message.to = "Sheldon Cooper <sheldon@bigbangtheory.com>" message.subject = "Hi Sheldon!" message.content_type = "text/html" message.body = "Hello my friend!" # set custom headers at will. message["CUSTOM-HEADER"] = "my custom header value" 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. The plugin will try to use ActiveSupport Json if it is already included. If not, it will attempt using the built-in ruby Json library. You can also explicitly specify which one to be used, using Postmark.response_parser_class = :Json # :ActiveSupport or :Yajl is also supported. == Limitations Currently postmark API does not support multiple recipients, or attachments. For more information, check the docs here: TODO: URL to docs. == 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 (c) 2009 Wildbit LLC. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
postmark-0.4.0 | README.rdoc |