PHPackages                             paubox/paubox-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. paubox/paubox-php

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

paubox/paubox-php
=================

A PHP package for the Paubox Transactional Email API

v1.1.0(7y ago)26.9k↓77.7%3[1 issues](https://github.com/Paubox/paubox-php/issues)[2 PRs](https://github.com/Paubox/paubox-php/pulls)Apache-2.0PHPCI failing

Since Sep 27Pushed 2w agoCompare

[ Source](https://github.com/Paubox/paubox-php)[ Packagist](https://packagist.org/packages/paubox/paubox-php)[ Docs](https://github.com/Paubox/paubox-php)[ RSS](/packages/paubox-paubox-php/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (13)Used By (0)

[![Paubox](https://avatars.githubusercontent.com/u/22528478?s=200&v=4)](https://avatars.githubusercontent.com/u/22528478?s=200&v=4)

Paubox PHP
==========

[](#paubox-php)

**NEW:** [Version 2 of the Paubox Email API SDK for PHP](https://github.com/Paubox/paubox-php/tree/sdk-generation/v2.0.0-beta) is available to beta test now. It includes code for newer features like bulk message sending, dynamic templates, and more. We will be deprecating the old in the near future.

This is the official PHP wrapper for the [Paubox Email API](https://www.paubox.com/products/paubox-email-api).

The Paubox Email API allows your application to send secure, HIPAA compliant email via Paubox and track deliveries and opens. The API wrapper also allows you to construct and send messages.

Table of Contents
=================

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Sending messages](#sending-messages)
    - [Allowing non-TLS message delivery](#allowing-non-tls-message-delivery)
    - [Forcing Secure Notifications](#forcing-secure-notifications)
    - [Adding Attachments and Additional Headers](#adding-attachments-and-additional-headers)
    - [Checking Email Dispositions](#checking-email-dispositions)
    - [Paubox Forms](#paubox-forms)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

Using composer:

```
$ composer require paubox/paubox-php
```

### Getting Paubox API Credentials

[](#getting-paubox-api-credentials)

You will need to have a Paubox account. You can [sign up here](https://www.paubox.com/pricing/paubox-email-api).

Once you have an account, follow the instructions on the Rest API dashboard to verify domain ownership and generate API credentials.

### Configuring API Credentials

[](#configuring-api-credentials)

Include your API credentials in your environment file.

```
$ echo "export PAUBOX_API_KEY='YOUR_API_KEY'" > .env
$ echo "export PAUBOX_API_USER='YOUR_ENDPOINT_NAME'" >> .env
$ source .env
$ echo ".env" >> .gitignore
```

Usage
-----

[](#usage)

To send email, prepare a Message object and call the sendMessage method of Paubox.

### Sending messages

[](#sending-messages)

```
