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

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

headsnet/sms-bundle
===================

Provide email and SMS sending functions

v0.1.12(7y ago)11.2k2MITPHPPHP &gt;=7.0

Since Sep 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/headsnet/sms-bundle)[ Packagist](https://packagist.org/packages/headsnet/sms-bundle)[ RSS](/packages/headsnet-sms-bundle/feed)WikiDiscussions develop Synced 2w ago

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

Symfony SMS Bundle
==================

[](#symfony-sms-bundle)

Symfony bundle to send and receive SMS messages. Currently only the Esendex SMS gateway is supported - . Other gateways may be added in the future.

Greatly inspired by the excellent `tomazahlin/symfony-mailer-bundle`

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

[](#installation)

**Requires Symfony &gt;= 3.3 and PHP &gt;= 7.0**

Install with Composer

`composer require headsnet/sms-bundle`

Add bundle to `AppKernel.php`

```
public function registerBundles()
{
    $bundles = array(
        // ...
        new Headsnet\SmsBundle\HeadsnetSmsBundle(),
    );
}

```

If you need to receive SMS then add the routing configuration in `app/config/routing.yml`

```
headsnet_sms:
  resource: '@HeadsnetSmsBundle/Resources/config/routing.yml'
  prefix:   '/sms'

```

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

[](#configuration)

Add required configuration in `app/config.yml`

```
headsnet_sms:
  dispatcher:          esendex
  esendex:
    account_reference: ~
    username:          ~
    password:          ~
    vmn:               ~  # Virtual Mobile Number

```

To simulate SMS sending, you can use the `DummyDispatcher` - for example in your when running your test suite - add the following to `app/config_test.yml`

```
headsnet_sms:
  dispatcher: dummy

```

To override the recipient phone number, for example in development, add the following to `app/config_dev.yml`

```
headsnet_sms:
  delivery_override:   '+33123456789'

```

### Define SMS message templates

[](#define-sms-message-templates)

Create a mapping service to link template path definitions to template names

```
