PHPackages                             erenkucukersoftware/php-ses - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. erenkucukersoftware/php-ses

ActiveLibrary[API Development](/categories/api)

erenkucukersoftware/php-ses
===========================

An Amazon SES api for PHP. Support signature version 4

7.0.0(5y ago)125MITPHPPHP ^7.2

Since May 9Pushed 4y agoCompare

[ Source](https://github.com/erenkucukersoftware/php-ses)[ Packagist](https://packagist.org/packages/erenkucukersoftware/php-ses)[ Docs](https://github.com/okamos/php-ses)[ RSS](/packages/erenkucukersoftware-php-ses/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

Amazon Simple Email Service for PHP
===================================

[](#amazon-simple-email-service-for-php)

![license](https://camo.githubusercontent.com/eaadc2ef0239cbe64b9036d06f1243f4f25e4e3871826bcfbb29c692e378890b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f6b616d6f732f7068702d7365732e737667)
php-ses is a PHP library for Amazon's Simple Email Service's REST API [Amazon SES](https://aws.amazon.com/ses/)

Installation
------------

[](#installation)

Install via [Composer](https://getcomposer.org/)

```
composer require okamos/php-ses
```

Getting started
---------------

[](#getting-started)

To get started you need to require ses.php

```
listIdentities(); // string[]
```

Version Guidance
----------------

[](#version-guidance)

VersionPHP Version1.x&gt;= 5.6, &gt;= 7.07.x&gt;= 7.2Available API
-------------

[](#available-api)

- ListIdentities
- VerifyEmailIdentity
- DeleteIdentity
- SendEmail
- GetSendQuota
- GetSendStatistics
- GetIdentityVerificationAttributes

Usage
-----

[](#usage)

Listing identities.

```
// List all identities your domains.
$identities = $ses->ListIdentities('Domain');
// List all identities your email addresses.
$identities = $ses->ListIdentities('EmailAddress');
$identities[0]; // your@email.com
```

Verify Email.

```
$ses->verifyEmailIdentity('your-email@example.com'); // return string(RequestId)
```

Delete an identity.

```
$ses->deleteIdentity('your-email@example.com'); // return string(RequestId)
```

Get verification token and status.

```
$identities = [
    'your-email@example.com',
    'your-domain.com'
];
$entries = $ses->getIdentityVerificationAttributes($identities);
$entries[0]['Email']; // string (email)
$entries[0]['Token']; // string(token)
$entries[1]['Status']; // string(Pending | Success | Failed | TemporaryFailure)
```

Get your AWS account's send quota.

```
$sendQuota = $ses->getSendQuota();
$sendQuota['Max24HourSend'] // string
$sendQuota['SentLast24Hours'] // string
$sendQuota['MaxSendRate'] // string
```

Get your sending statistics.

```
$data = $ses->getSendStatistics();
$data['Complaints'] // string
$data['Rejects'] // string
$data['Bounces'] // string
$data['DeliveryAttempts'] // string
$data['Timestamp'] // string
```

Send Email Basic Usage.

```
$envelope = new SimpleEmailServiceEnvelope(
    'your-email@example.com',
    'Subject',
    'Message',
);
$envelope->addTo('to@example.com');

$requestId = $ses->sendEmail($envelope);
```

Send Email with HTML.

```
$envelope = new SimpleEmailServiceEnvelope(
    'your-email@example.com',
    'Subject',
    'Message',
    'Message
