You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would love to start using Symfony Notifier for sending SMS notifications in our project. We have just one blocker.
In most countries, we use our brand name in the sender name. But due to regulations in the U.S., we have to use a regular number. Due to the volume of messages we send, we have several numbers that we use evenly.
Right now we can define default 'from' when we set DNS (Docs). But there is no posibility to change this default variable.
What do you think about adding setForm method on SmsMessage class? I think this optional step will be really helpful not only for us :)
If you agree I can prepare PR - it looks like not really complicated issue :)
We love what are you doing :)
Greetings from Poland
Daniel
Example
useSymfony\Component\Notifier\Message\SmsMessage;
$sms = newSmsMessage(
// the phone number to send the SMS message to'+1411111111',
// the message'A new login was detected!'
);
$sms->setFrom('+48 123 456 789');
$sentMessage = $texter->send($sms);
The text was updated successfully, but these errors were encountered:
This PR was merged into the 6.2 branch.
Discussion
----------
[Notifier] Add `from` in `SmsMessage`
| Q | A
| ------------- | ---
| Branch? | 6.1
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#45435
| License | MIT
| Doc PR | symfony/symfony-docs#16701 [WIP]
This PR allow to define `From` in `SmsMessage`. When it defined, it override default `from` in transports.
```php
$sms = new SmsMessage(
// the phone number to send the SMS message to
'+1411111111',
// the message
'A new login was detected!',
// [Optional] the From SMS message, it can also be a name
'+1422222222',
);
// Can also be defined with setter
$sms->setFrom('+1422222222');
$sentMessage = $texter->send($sms);
```
Commits
-------
21b5051 [Notifier] Add from in SmsMessage and support it in bridge transports
Description
We would love to start using Symfony Notifier for sending SMS notifications in our project. We have just one blocker.
In most countries, we use our brand name in the sender name. But due to regulations in the U.S., we have to use a regular number. Due to the volume of messages we send, we have several numbers that we use evenly.
Right now we can define default 'from' when we set DNS (Docs). But there is no posibility to change this default variable.
What do you think about adding
setForm
method onSmsMessage
class? I think this optional step will be really helpful not only for us :)If you agree I can prepare PR - it looks like not really complicated issue :)
We love what are you doing :)
Greetings from Poland
Daniel
Example
The text was updated successfully, but these errors were encountered: