x-one / smsplanet-notifier-bundle
Integrates SMSPLANET provider with Symfony Notifier
Installs: 120
Dependents: 0
Suggesters: 0
Security: 0
Type:symfony-bundle
pkg:composer/x-one/smsplanet-notifier-bundle
Requires
- php: ^8.1
- symfony/framework-bundle: ^6.2
- symfony/http-client: ^6.2
- symfony/notifier: ^6.2
- symfony/property-access: ^6.2
Requires (Dev)
- symfony/mailer: ^6.2
- symfony/mime: ^6.2
- symfony/phpunit-bridge: ^6.2
This package is auto-updated.
Last update: 2025-10-14 17:43:00 UTC
README
Provides SMSPLANET integration for Symfony Notifier.
composer require x-one/smsplanet-notifier-bundle
DSN example
SMSPLANET_DSN=smsplanet://KEY:PASSWORD@default?from=FROM&test=TEST
where:
KEY
is your API key (token)PASSWORD
is your API passwordTEST
setting this parameter to "1" (default "0") will result in sending message in test mode (message is validated, but not sent)
See your account info at https://panel.smsplanet.pl/.
Adding options to a message
You can use the SmsplanetOptions
class to add message options:
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;
use XOne\Bundle\NotifierBundle\SmsplanetOptions;
$sms = new SmsMessage('+4811111111', 'My message');
$options = (new SmsplanetOptions())
->date((new DateTime())->modify('+1 hour'))
->name('Start systemu')
->clearPolish(true)
->param1(['Jan', 'Zbigniew', 'Jerzy'])
->param2(['Kowalski', 'Nowak', 'Wiśniewski'])
->param3(['54-152', '43-190', '60-118'])
->param4(['Wrocław', 'Mikołów', 'Poznań'])
->companyId('A005')
->transactional(true)
;
// Add the custom options to the sms message and send the message
$sms->options($options);
/**
* @var TexterInterface $texter
*/
$texter->send($sms);