|
Project Information
Members
Links
|
RESTful Messaging with HowlrThe Howlr daemon provides RESTful interface for sending outgoing messages. Messages are submitted via HTTP and dispatched to other protocols. Currently only email (SMTP and Sendmail) is supported, but other delivery methods (SMS, IM, etc.) are possible. The idea is to provide a RESTful messaging service, as part of a larger REST-based enterprise infrastructure. Features
Installation
gem install howlr howlr -c ~/howlr.yml ~/howlr.yml howlr -c ~/howlr.yml That's it. Your Howlr instance should now be ready to start receiving REST requests for sending out messages. UsageSimple example using Ruby's ActiveResource: require 'active_resource' # Define the proxy class class Message < ActiveResource::Base self.site = 'http://localhost:7008' end message = Message.new message.subject = "Howlr Test" message.body = "This is just a test!" message.from = "Test McTestski <test@example.foo>" message.recipients = "John Doe <jdoe@example.foo>; Sally Smith <ssmith@example.foo>" # Saving the message commits it to the server, causing the message to # be sent out. message.save # The server temporarily stores copies of all sent messages. Saving a # message (i.e. sending it) assigns to it a unique ID. We can use this # ID to later retrieve a copy of this message. message2 = Message.find(message.id) Also a look at the HowlrAPI, and the PHP Zend_Rest_Client sample code. You will also probably want to configure Howlr to run as an init.d service. Finally, if you're interested in other RESTful services, have a look at Taskr, a RESTful scheduler daemon. |