PHPackages                             zhb/nexmo-bundle - 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. zhb/nexmo-bundle

Abandoned → [https://github.com/symfony/nexmo-notifier](/?search=https%3A%2F%2Fgithub.com%2Fsymfony%2Fnexmo-notifier)Symfony-bundle

zhb/nexmo-bundle
================

Symfony Nexmo SMS integration

v0.1.0(7y ago)3199[1 issues](https://github.com/ZHB/ZhbNexmoBundle/issues)MITPHPPHP ^7.1.3

Since Sep 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ZHB/ZhbNexmoBundle)[ Packagist](https://packagist.org/packages/zhb/nexmo-bundle)[ RSS](/packages/zhb-nexmo-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

NexmoBundle
===========

[](#nexmobundle)

[Nexmo](https://www.nexmo.com) SMS integration for Symfony. This bundle provides a simple service to send SMS from your application.

[![Build Status](https://camo.githubusercontent.com/7955972d042f1d079dac3ab354243021d9c0d5642890feac7229926f0959bb1b/68747470733a2f2f7472617669732d63692e6f72672f5a48422f5a68624e65786d6f42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ZHB/ZhbNexmoBundle)

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

[](#installation)

Use [Composer](http://getcomposer.org/) to install NexmoBundle in your project:

```
composer require "zhb/nexmo-bundle"
```

Configuration
-------------

[](#configuration)

First of all, create a [Nexmo](https://www.nexmo.com) account. Next, configure the bundle :

```
# config/packages/zhb_nexmo.yaml

zhb_nexmo:
    provider: 'zhb_nexmo.mail' # (optional) default to zhb_nexmo.sms
    disable_delivery: true # (optional) default to false.
    sms:
        api_key: 'nexmo_api_key'
        api_secret: 'nexmo_api_secret'
        from: 'John Doe'
        ttl: '86400000' # (optional) default to 259200000 ms.
        callback: 'https://website.com/zhb-nexmo/delivery-receipt' # (optional) default to null. This parameter overrides the webhook endpoint you set in Dashboard.
    mail:
        from: 'email@sent.from'
        to: 'email@sent.to'
```

To be able to use Nexmo delivery receipt (DLR) :

```
# config/routes/zhb_nexmo.yaml

_zhb_nexmo:
    resource: '@ZhbNexmoBundle/Resources/config/routes.xml'
    prefix: /zhb-nexmo/delivery-receipt # change as you want
```

To set up the webhook used for incoming messages, use `zhb_nexmo.sms.callback` parameter or use the message setter :

```
$message->setCallback('https://website.com/nexmo/delivery-receipt');
```

Alternatively, you can go to the [your numbers](https://dashboard.nexmo.com/your-numbers) section of the Nexmo Dashboard. Click 'edit' for the virtual number and set the Callback URL (the prefix defined above).

Usage
-----

[](#usage)

### How to send an SMS

[](#how-to-send-an-sms)

```
