Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 798 Bytes

README.textile

File metadata and controls

31 lines (21 loc) · 798 Bytes

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.