diff options
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | lib/SendGrid.php | 2 | ||||
-rw-r--r-- | test/SendGrid.php | 2 |
5 files changed, 22 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e423f70..4648900 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [v3.2.0] - (2015-05-13) +### Added +- Specify Guzzle proxy via [#149](https://github.com/sendgrid/sendgrid-php/pull/149) +- Option to disable exception raising + ## [v3.1.0] - (2015-04-27) ### Added - Support for API keys @@ -12,7 +12,7 @@ One of the most notable changes is how `addTo()` behaves. We are now using our W Smtpapi addressing methods cannot be mixed with non Smtpapi addressing methods. Meaning you cannot currently use Cc and Bcc with `addSmtpapiTo()`. -The `send()` method now raises a `\SendGrid\Exception` if the response code is not 200 and returns an instance of `\SendGrid\Response`. +The `send()` method now raises a `\SendGrid\Exception` by default if the response code is not 200 and returns an instance of `\SendGrid\Response`. --- @@ -53,7 +53,7 @@ Add SendGrid to your `composer.json` file. If you are not using [Composer](http: ```json { "require": { - "sendgrid/sendgrid": "~3.1" + "sendgrid/sendgrid": "~3.2" } } ``` @@ -111,6 +111,17 @@ Send it. ```php $sendgrid->send($email); ``` + +### Exceptions + +A `SendGrid\Exception` is raised by default if the response is not 200 OK. + +To disable exceptions, pass in the `raise_exceptions => false` option when creating a `SendGrid\Client`. + +```php +$client = new SendGrid('SENDGRID_APIKEY', array('raise_exceptions' => false)); +``` + ### Options Options may be passed to the library when initializing the SendGrid object: @@ -122,6 +133,7 @@ $options = array( 'endpoint' => '/api/mail.send.json', 'port' => null, 'url' => null, + 'raise_exceptions' => false ); $sendgrid = new SendGrid('username', 'password', $options); ``` diff --git a/composer.json b/composer.json index 721cd13..f7e761e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sendgrid/sendgrid", "description": "This library allows you to quickly and easily send emails through SendGrid using PHP.", - "version": "3.1.0", + "version": "3.2.0", "homepage": "http://github.com/sendgrid/sendgrid-php", "license": "MIT", "keywords": ["SendGrid", "sendgrid", "email", "send", "grid"], diff --git a/lib/SendGrid.php b/lib/SendGrid.php index 78b0c69..318a7c1 100644 --- a/lib/SendGrid.php +++ b/lib/SendGrid.php @@ -2,7 +2,7 @@ class SendGrid { - const VERSION = '3.1.0'; + const VERSION = '3.2.0'; protected $namespace = 'SendGrid', diff --git a/test/SendGrid.php b/test/SendGrid.php index 42bb051..e8f3968 100644 --- a/test/SendGrid.php +++ b/test/SendGrid.php @@ -12,7 +12,7 @@ class SendGridTest_SendGrid extends PHPUnit_Framework_TestCase public function testVersion() { - $this->assertEquals(SendGrid::VERSION, '3.1.0'); + $this->assertEquals(SendGrid::VERSION, '3.2.0'); $this->assertEquals(json_decode(file_get_contents('../composer.json'))->version, SendGrid::VERSION); } |