Skip to content
Go to file
This branch is 1 commit ahead, 10 commits behind joelcox:master.

Latest commit


Git stats


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

CodeIgniter Amazon SES

A CodeIgniter library to interact with Amazon Web Services (AWS) Simple Email Service (SES). This library was designed with the standard CodeIgniter email class in mind. As a result, most methods look the same, ensuring a minimal learning curve.

NOTE: this code is still under heavy development and currently provides only the very basics of the AWS SES API (don't you like acronyms?), sending email.


  1. PHP 5.1+
  2. CodeIgniter 2.0+
  3. libcurl with OpenSSL support
  4. Phil Sturgeon's CodeIgniter cURL library
  5. A bundle of public root certificates (e.g.
  6. An Amazon Web Services account


This library is also released as a Spark. If you use this library in any other way, don't copy the autoload.php to your config directory.



This library expects a configuration file to function correctly. A template for this file is provided with the library.

Verify email address

Before you can send your first message, Amazon SES requires that you verify your email address. This is to confirm that you own the email address, and to prevent others from using it.

Request to verify your email address as a sender.


Check whether a email address is verified as a sender.



Set the "To" address(es) for a message.


Set the "CC" address(es) (carbon copy) for a message.


Set the "BCC" address(es) (blind carbon copy) for a message.

$this->amazon_ses->bcc(array('', '', ''));

These three methods expect valid e-mail addresses as a string, array or comma separated list.


Set the sender address. You can also set this in your config file. The second parameter - the vanity name of the sender - is optional.

$this->amazon_ses->from('', 'Email monkey');

Set the subject for a message.

$this->amazon_ses->subject('Open me!');

Set the message to be sent.

$this->amazon_ses->message('<strong>Use HTML</strong>');

Set the alternative message (plain-text) to be sent. When not specified, an alternative message is generated by using PHP's strip_tags() function.

$this->amazon_ses->message_alt('No HTML?!');

Sends the message. Returns true on success.


NOTE: All methods above are chainable, which means you can do the following

$this->amazon_ses->to('')->subject('Yo!')->message('Sup dawg')->send();


Sends the message in debug mode. In debug mode, the send() methods returns the actual API response instead of a boolean. Call this method before calling the send method.


Preserves recipient after the message has been successfully send. When you call this method, all recipients will be preserved during the objects life. This makes it possible to sent an additional message without re-specifying the recipients.



I am a firm believer of social coding, so if when you find a bug, please fork my code on GitHub and squash it. I will be happy to merge it back in to the code base (and add you to the "Thanks to" section). If you're not too comfortable using Git or messing with the inner workings of this library, please open a new issue.

Thanks to


A CodeIgniter library to interact with Amazon Web Services (AWS) Simple Email Service (SES)




No packages published


You can’t perform that action at this time.