PHPackages                             seriousemail/seriousemail-php - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. seriousemail/seriousemail-php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

seriousemail/seriousemail-php
=============================

This library allows you to quickly and easily send emails through Serious.Email using PHP.

031PHP

Since Oct 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/SeriousEmail/seriousemail-php)[ Packagist](https://packagist.org/packages/seriousemail/seriousemail-php)[ RSS](/packages/seriousemail-seriousemail-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

seriousemail-php
================

[](#seriousemail-php)

This is a PHP class to help access the Serious.Email API. The Serious.Email API leverages Serious Email's HTML email templating system and analytics while allowing you to trigger sends from your own server. You may send one or more emails simutaneously and as many emails as your account allows.

### Demo

[](#demo)

You can see and test the Serious Email API here: [DEMO](https://serious.email/api-demo)

### Prerequisites

[](#prerequisites)

This class requires an account Serious.email.

Getting Started
---------------

[](#getting-started)

You can install this package via Composer or manually.

**Composer**

Add SeriousEmail to your composer.json file.

```
{
  "require": {
    "seriousemail/seriousemail-php": "dev-master"
  }
}

```

At the top of your PHP script require the autoloader:

```
require 'vendor/autoload.php';

```

**Manually**

If you're not using composer, you can [Download](https://github.com/dommermuth/seriousemail-php/archive/master.zip) this package (example included) to help you trigger email sends at Serious.email.

### Instructions

[](#instructions)

This API requires that you set up a few things at Serious.email.

1. **Generate a public\_api\_key and api\_secret**

*Note the api\_secret and keep in a safe place as it will only be revealed once. In the event you forget it, you'll need to regenerate your keys again.*

2. **Create a subscribers list**

Subscribers that you add via this API will be saved to this list. This enables comprehensive analytics, future sends and data back-up.

3. **Create a campaign and note it's ID**

You will include this ID when using this API to trigger a send.

Use the settings dialog to indicate a default subcriber list, default test subscriber list, sender name and sender email.

4. **Create an email template and note it's ID**

This is the template that will be sent to your remotely added subscribers.

5. **Use the example provided as a basis for adding your own content.**

Now that you have set-up everything at Serious.email and you've installed this package - you can start sending emails. Below is an example script for accessing the API and sending an email:

```
