Developed with love by KnpLabs Hire us for your project!
0

NexmoBundle

by docdocdoc

Send SMS with nexmo.com and symfony

DocDocDocNexmoBundle

Allow you to send sms using nexmo

Installation

Run

php composer.phar require docdocdoc/nexmo-bundle dev-master

Add in your AppKernel :

new DocDocDoc\NexmoBundle\DocDocDocNexmoBundle(),

Configuration

in config.yml :

doc_doc_doc_nexmo:
    api_key: YOUR_API_KEY
    api_secret: YOUR_API_SECRET

Usage

$message = new \DocDocDoc\NexmoBundle\Message\Simple("SenderId", "phone", "content of your sms");
$nexmoResponse = $this->container->get('doc_doc_doc_nexmo')->send($message);

Providers

For tests you can receive your sms in mail or just not send it :

in config.yml :

Send by mail

doc_doc_doc_nexmo:
    provider: doc_doc_doc_nexmo.send_mail
    mail_to: email@allsmshere.com
    mail_from: [default: no-reply@nexmobundle.com]

Just trash it

doc_doc_doc_nexmo:
    provider: doc_doc_doc_nexmo.noop
Copyright (c) 2014 Cedric LOMBARDOT

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
doc_doc_doc_nexmo:
provider: doc_doc_doc_nexmo.send_sms
api_key: ~
api_secret: ~
mail_to: ~
mail_from: no-reply@nexmobundle.com