Ruby library for upcoming automated mailing service.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
README.textile

README.textile

Smail Webservice

Print Stuff Mail is snail mail webservice, allowing physical letters to be sent from the comfort of your own command line.

Installation

gem install psm

That’s it.

Example

  
    require 'psm'
    
    # PrintStuffMail, aliased as PSM, is our namespace.
    # 1. set your account id.
    PSM.account_id = 'abcdefg' 
    
    # 2. mail a letter!
    # Since this method will eventually cause a credit card to be charged
    # we've taken extra precautions to label it as dangerous. The exclamation,
    # for one, calls attention to the method, but furthermore a block has to be
    # passed in "confirming" the method.
    PSM.mail!( 'message', 'address', 'return_address') {|c| c.confirm!}
    
    # 3. there is no step three.