PHPackages                             hr-d/pepipost - 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. hr-d/pepipost

ActiveLibrary[API Development](/categories/api)

hr-d/pepipost
=============

Pepipost API is used to send the mail to the receipients specified in the docs

v5.1.0.2(5mo ago)077MITPHPPHP &gt;=5.4.0

Since Aug 9Pushed 5mo agoCompare

[ Source](https://github.com/hr-d/pepipost-sdk-php)[ Packagist](https://packagist.org/packages/hr-d/pepipost)[ Docs](https://apimatic.io)[ RSS](/packages/hr-d-pepipost/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

[![pepipostlogo](https://camo.githubusercontent.com/be5b50158043ef5fd218fc9441caaceb16789d48feb0e23dab31211f5c5eb81f/68747470733a2f2f70657069706f73742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30372f505f4c4f474f2e706e67)](https://camo.githubusercontent.com/be5b50158043ef5fd218fc9441caaceb16789d48feb0e23dab31211f5c5eb81f/68747470733a2f2f70657069706f73742e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30372f505f4c4f474f2e706e67)

[![Packagist](https://camo.githubusercontent.com/786d240f803f1cd1ca8c130378df634a4391fe67c531f22aa6f1cf631a4eef4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70657069706f73742f70657069706f73742d73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepipost/pepipost-sdk-php)[![Packagist](https://camo.githubusercontent.com/9d74349593c341357961adec6591adab1093cbb4b8d65bb30da7f6fb64cefdda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70657069706f73742f70657069706f73742d73646b2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepipost/pepipost-sdk-php)[![Packagist](https://camo.githubusercontent.com/3e97ce235f7850080ab483fd5791222ea4e682a58e7210bad7d0a7c4f4e376a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f70657069706f73742f70657069706f73742d73646b2d7068702e737667)](https://github.com/pepipost)[![Packagist](https://camo.githubusercontent.com/ba82607896190abcab0dcad7dddbc64c872ea497eba8ce1a39ef2d486eb6e83e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70657069706f73742f70657069706f73742d73646b2d7068702e737667)](https://packagist.org/packages/pepipost/pepipost-sdk-php)[![Open Source Helpers](https://camo.githubusercontent.com/914b2646c783b01dbb16cd0f0022fc9563f3803bdc12a3ccc788b6bdecaa977a/68747470733a2f2f7777772e636f64657472696167652e636f6d2f70657069706f73742f70657069706f73742d73646b2d7068702f6261646765732f75736572732e737667)](https://www.codetriage.com/pepipost/pepipost-sdk-php)[![Twitter Follow](https://camo.githubusercontent.com/d06f7dfbd36d316d9fa1985c76c7defbf4755be6a295994c6932b5476c0ed93a/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f706570695f706f73742e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://twitter.com/pepi_post)

Official PHP Code library for [Pepipost](http://www.pepipost.com/?utm_campaign=GitHubSDK&utm_medium=GithubSDK&utm_source=GithubSDK)
-----------------------------------------------------------------------------------------------------------------------------------

[](#official-php-code-library-for-pepipost)

This SDK contains methods for easily interacting with the Pepipost Email Sending API to send emails in a few seconds.

We are trying to make our libraries community driven and we need your help in building the right things the right way you. Your opinion is very much valued so please share comments, create [issues](https://github.com/pepipost/pepipost-sdk-php/issues) and [pull requests](https://github.com/pepipost/pepipost-sdk-php/pulls).

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quickstart)
- [Announcements](#announcements)
- [Roadmap](#roadmap)
- [About](#about)
- [License](#license)

Installation (OS Friendly)
--------------------------

[](#installation-os-friendly)

For a smooth installation process, we have categorized installation process according to OS:

1. [Build SDK on Windows without any IDE.](https://github.com/pepipost/pepipost-sdk-php/blob/master/windows-installation-1.md)
2. [Build SDK on Windows/Linux with IDE.](https://github.com/pepipost/pepipost-sdk-php/blob/master/windows-installation-2.md)
3. [Build SDK on Linux.](https://github.com/pepipost/pepipost-sdk-php/blob/master/linux-installation.md)

### Prerequisites

[](#prerequisites)

- 1. [PHP &gt;=5.4.0](http://php.net/manual/en/install.php)
- 2. [Composer](https://getcomposer.org/download/)
- 3. [CURL](https://curl.haxx.se/)
- 4. A free account on Pepipost. If you don't have a one, click [here](https://app.pepipost.com/index.php/signup/registeruser?utm_campaign=GitHubSDK&utm_medium=GithubSDK&utm_source=GithubSDK) to signup and get 30,000 emails free every month.

### Setup Global Variables

[](#setup-global-variables)

Setup the [PEPIPOST API KEY](https://app.pepipost.com/app/settings/integration) in the library to start sending emails. For example:

1. Copy the API KEY from your Pepipost account by navigating to Settings --&gt; Integrations.
2. Edit the sample code and replace `PEPIPOST_API_KEY` which the one you just copied.
3. Now the library is ready to authenticate with Pepipost servers for sending emails.

Quick Start
-----------

[](#quick-start)

Developers already familar with GIT, Composer and some of the other handy tools can just refer the below steps to quick start with the integration.

> If you are not sure of how to integrate this library within your environment, then please refer to our detailed [installation](#installation) guide above.

1. Check php version using below command. Required PHP &gt;=5.4.0.

`php -v`

2. Verify if the Composer is installed using the below command:

`composer --version`

3. Clone this repository on your machine using below command:

`git clone https://github.com/pepipost/pepipost-sdk-php.git testSDK`

4. Change directory

`cd testSDK`

5. Below will install all the requirement needed to run this library. After installing, a vendor directory will get auto-created

`composer install`

6. Copy the code and paste in test.php from [simple-usage.php](https://github.com/pepipost/pepipost-sdk-php/blob/master/simple-usage.php) or [sampleExample](https://github.com/pepipost/pepipost-sdk-php#sample-code-for-testphp) .

`cp simple-usage.md test.php`

7. Get your API key and Sending Domain from your Pepipost account.

- **apikey** will be available under Login to Pepipost -&gt; Settings -&gt; Integration
- **Sending Domain** will be available under Login to Pepiost -&gt; Settings -&gt; Sending Domains

```
  *Note :: Domains showing with Active status on Sending Domain dashboard are only allowed to send any sort of emails.* In case there are no Sending Domain added under your account, then first add the domain, get the DNS (SPF/DKIM) settings done and get it reviewed by our compliance team for approval. Once the domain is approved, it will be in ACTIVE status and will be ready to send any sort of emails.

```

8. Make the required changes in your script test.php (Adding the apikey and Sending Domain is mandatory).

Change your **`$apiKey = 'api-XX-key-XX-here'`** to **`$apiKey = 'api-key-of-your-pepipost-account';`**

Similarly, update your Sending Domain from:

**`$body->from->fromEmail = 'admin@myfirsttest.com';`** to **`$body->from->fromEmail = 'admin@your-active-domain-on-pepipost';`**

9. Update the rest of the email related payload like Recipent email address, content of the email etc. Below is the sample code with details of payload:

Sample Code for test.php
------------------------

[](#sample-code-for-testphp)

```
