Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/symfony/message-media-notifier
Symfony MessageMedia Notifier Bridge
https://github.com/symfony/message-media-notifier
component messagemedia notifier php sms symfony symfony-component
Last synced: 3 months ago
JSON representation
Symfony MessageMedia Notifier Bridge
- Host: GitHub
- URL: https://github.com/symfony/message-media-notifier
- Owner: symfony
- License: mit
- Created: 2021-07-04T08:46:47.000Z (over 3 years ago)
- Default Branch: 7.1
- Last Pushed: 2024-09-27T08:39:11.000Z (3 months ago)
- Last Synced: 2024-09-30T16:04:22.534Z (3 months ago)
- Topics: component, messagemedia, notifier, php, sms, symfony, symfony-component
- Language: PHP
- Homepage: https://symfony.com/notifier
- Size: 51.8 KB
- Stars: 6
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
MessageMedia Notifier
=================Provides [MessageMedia](https://messagemedia.com/) integration for Symfony Notifier.
DSN example
-----------```
MESSAGEMEDIA_DSN=messagemedia://API_KEY:API_SECRET@default?from=FROM
```where:
- `API_KEY` is your API key
- `API_SECRET` is your API secret
- `FROM` is your registered sender ID (optional). Accepted values: 3-15 letters, could be alpha tag, shortcode or international phone number.
When phone number starts with a `+` sign, it needs to be url encoded in the DSNAdding Options to a Message
---------------------------With a MessageMedia Message, you can use the `MessageMediaOptions` class to add
[message options](https://messagemedia.github.io/documentation/#tag/Messages/operation/SendMessages).```php
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\MessageMedia\MessageMediaOptions;$sms = new SmsMessage('+1411111111', 'My message');
$options = (new MessageMediaOptions())
->media(['media'])
->callbackUrl('callback_url')
->format('format')
->deliveryReport(true)
->expiry(999)
->metadata(['metadata'])
->scheduled('scheduled')
->subject('subject');
// ...
;// Add the custom options to the sms message and send the message
$sms->options($options);$texter->send($sms);
```Resources
---------* [Contributing](https://symfony.com/doc/current/contributing/index.html)
* [Report issues](https://github.com/symfony/symfony/issues) and
[send Pull Requests](https://github.com/symfony/symfony/pulls)
in the [main Symfony repository](https://github.com/symfony/symfony)