Project

psm

0.0
No commit activity in last 3 years
No release in over 3 years
Print Stuff Mail provides an RESTful API for sending snail mail. This library eases interfacing with it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.5
>= 2.10.3

Runtime

>= 2.1.1
>= 1.2.3
 Project Readme

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.