Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PostageApp for CodeIgniter

This is the gem used to integrate CodeIgniter apps with PostageApp service. Personalized, mass email sending can be offloaded to PostageApp via JSON based API. All documented API functions have been added. See the API Documentation for more information.

API DocumentationPostageApp FAQsPostageApp Help Portal


  • Copy both system/application/config/postageapp.php and system/application/libraries/PostageApp.php
  • Edit config/postageapp.php to include your PostageApp Project API key.

Email Usage

PostageApp for CodeIgniter works very similarly to built-in Email class. Here's a simple example:


$this->postageapp->subject('Example Email');
$this->postageapp->message('Example Message');

$this->postageapp->variables(array('variable' => 'value'));

$this->postageapp->send(); # returns JSON response from the server

If you wish to send both html and plain text parts call message function like this:

  'text/html'   => 'html content',
  'text/plain'  => 'text content'

You can set headers all in one go:

  'subject' => 'Example Subject',
  'from'    => ''

Recipients can be specified in a number of ways. Here's how you define a list of them with variables attached:

  '' => array('variable1' => 'value',
                                    'variable2' => 'value'),
  '' => array('variable1' => 'value',
                                    'variable2' => 'value')

For more information about formatting of recipients, templates and variables please see documentation

Recipient Override

To override the recipient insert your email address in config/postageapp.php:

$config['recipient_override'] = '';

Other Usage

Get Account Info

Provides information about the account.


Get Message Receipt

Confirm that message with a particular UID exists

$this->postageapp->get_message_receipt('Example UID');

Get Message Transmissions

To get data on individual recipients' delivery and open status, you can pass a particular message UID and receive a JSON encoded set of data for each recipient within that message.

$this->postageapp->get_message_transmissions('Example UID');

Get Messages

Gets a list of all message UIDs within your project, for subsequent use in collection statistics or open rates.


Get Method List

Get a list of all available api methods.


Get Metrics

Gets data on aggregate delivery and open status for a project, broken down by current hour, current day, current week, current month with the previous of each as a comparable.


Get Project Info

Provides information about the project. e.g. urls, transmissions, users.



PostageApp CodeIgniter Library for easier way to send email from web apps







No releases published


No packages published