Skip to content

Pollenizer/CakePHP-PostageApp-Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

CakePHP PostageApp Lib

A CakePHP Lib class used for interfacing with the PostageApp API.

For a full list of available methods and properties, please refer to the PostageApp API documentation here:

http://help.postageapp.com/kb/api/api-overview

INSTALLATION
------------

Copy PostageApp.php to your app/Lib directory

CONFIGURATION
---------------

1. Copy postageapp.php.default to your app/Config directory
2. Rename postageapp.php.default to postageapp.php
3. Update your apiKey in postageapp.php (all other variables are optional)

    $config = array(
        'PostageApp' => array(
            'apiKey' => 'YOUR API KEY',
            'attachments' => array(),
            'from' => null,
            'htmlMessage' => null,
            'recipientOverride' => null,
            'recipients' => null,
            'subject' => null,
            'template' => null,
            'textMessage' => null,
            'uid' => null,
            'variables' => array(),
        )
    );

USAGE
---------------

The following example shows how to send a simple text email:

    App::uses('PostageApp', 'Lib');
    $PostageApp = new PostageApp();
    $PostageApp->recipients('[email protected]');
    $PostageApp->subject('This is the subject');
    $PostageApp->textMessage('This is the message');
    $PostageApp->sendMessage();

About

A CakePHP Lib class used for interfacing with the PostageApp API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages