PHPackages                             pepipost/pepipost-laravel-driver - 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. pepipost/pepipost-laravel-driver

ActiveLibrary

pepipost/pepipost-laravel-driver
================================

This library adds a 'pepipost' mail driver to Laravel.

v3.0.0(3y ago)21.8k↓100%7[1 PRs](https://github.com/pepipost/pepipost-laravel-driver/pulls)MITPHPCI failing

Since Nov 13Pushed 1mo ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (8)Used By (0)

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

[![Packagist](https://camo.githubusercontent.com/d2ae6c8e07a0e31f6bd7b06f111cf9caea468a69de3c4c0d0da99e2050fa1638/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70657069706f73742f70657069706f73742d6c61726176656c2d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepipost/pepipost-laravel-driver)[![Packagist](https://camo.githubusercontent.com/8ee0220cdee96285ac0d2f12bb78cffd014e5755c5322a494c6e1c4895e27ddd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f70657069706f73742f70657069706f73742d6c61726176656c2d6472697665722e737667)](https://github.com/pepipost/pepipost-laravel-driver)[![Packagist](https://camo.githubusercontent.com/ee47aa5d7046973be130562fd94bff813f766e9d521e98b0c2d23d5ac36a4119/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70657069706f73742f70657069706f73742d6c61726176656c2d6472697665722e737667)](https://packagist.org/packages/pepipost/pepipost-laravel-driver)[![Open Source Helpers](https://camo.githubusercontent.com/d54f424f467faa1039f004d18b87784cbcd85f1303f8ad1d1301bef56f384dc5/68747470733a2f2f7777772e636f64657472696167652e636f6d2f70657069706f73742f70657069706f73742d6c61726176656c2d6472697665722f6261646765732f75736572732e737667)](https://www.codetriage.com/pepipost/pepipost-laravel-driver)[![Twitter Follow](https://camo.githubusercontent.com/d06f7dfbd36d316d9fa1985c76c7defbf4755be6a295994c6932b5476c0ed93a/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f706570695f706f73742e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)](https://twitter.com/pepi_post)

Laravel Driver for [Pepipost](http://www.pepipost.com/?utm_campaign=GitHubSDK&utm_medium=GithubSDK&utm_source=GithubSDK)
========================================================================================================================

[](#laravel-driver-for-pepipost)

A Mail Driver with support for Pepipost Send Email Web API, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.

To use this package required your [Pepipost Api Key](https://app.pepipost.com). Please make it [Here](https://app.pepipost.com).

We are trying to make our libraries Community Driven- which means we need your help in building the right things in proper order we would request you to help us by sharing comments, creating new [issues](https://github.com/pepipost/laravel-pepipost-driver/issues) or [pull requests](https://github.com/pepipost/laravel-pepipost-driver/pulls).

We welcome any sort of contribution to this library.

The latest 3.0.0 version of this library provides is fully compatible with the latest Pepipost v5.1 API.

For any update of this library check [Releases](https://github.com/pepipost/laravel-pepipost-driver/releases).

Table of Content
================

[](#table-of-content)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Usage of library in Project](#inproject)
- [Sample Example](#eg)
- [Announcements](#announcements)
- [Roadmap](#roadmap)
- [About](#about)
- [License](#license)

Installation
============

[](#installation)

### Prerequisites

[](#prerequisites)

[PHP &gt;= 8.0](https://www.php.net/manual/en/install.php)

[Composer v2.3.0](https://getcomposer.org/download/)

[Laravel &gt;= 9.x ](https://laravel.com/docs/9.x/installation)

[Illuminate Mail ^9.0](https://packagist.org/packages/illuminate/mail)

[Guzzle ^7.2](https://github.com/guzzle/guzzle)

A free account on Pepipost. If you don't have a one, [click here](https://app.pepipost.com) to signup.

Usage
-----

[](#usage)

### Configuring laravel project

[](#configuring-laravel-project)

#### Step 1 - Create New Laravel project

[](#step-1---create-new-laravel-project)

```
laravel new testproject
```

#### Step 2 - Add the package to your composer.json and run composer update.

[](#step-2---add-the-package-to-your-composerjson-and-run-composer-update)

```
"require": {
    "pepipost/pepipost-laravel-driver": "~3.0.0"
},
```

#### or install with composer

[](#or-install-with-composer)

```
$ composer require pepipost/pepipost-laravel-driver
```

#### Step 3 - Configurations

[](#step-3---configurations)

1. Add pepipost api key, endpoint in config/services.php

    ```
    'pepipost' => [
        'api_key' => env('PEPIPOST_API_KEY'),
    ],
    ```

    ```
    Endpoint config:
    If you need to set custom endpoint, you can set any endpoint by using endpoint key.
    For example,calls to Pepipost Web API through a proxy,configure endpoint in config/services.php.

      'pepipost' => [
          'api_key' => env('PEPIPOST_API_KEY'),
          'endpoint' => 'https://api.pepipost.com/v5/mail/send',
      ],
    ```
2. Add following in .env file

    ```
    MAIL_MAILER=pepipost # Needed to send through pepipipost api
    PEPIPOST_API_KEY='YOUR_PEPIPOST_API_KEY'
    ```
3. Add following in config/mail.php

    ```
    'mailers' => [
      'pepipost' => [
          'transport' => 'pepipost',
      ],
    ],
    ```

#### Step 4 - Laravel Steps to create controller and view

[](#step-4---laravel-steps-to-create-controller-and-view)

1. Define Controller

    ```
    php artisan make:controller TestController
    ```
2. Update the controller Include following function sendMail in TestController:

    ```
