File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -183,13 +183,19 @@ send SMS messages::
183
183
#[Route('/login/success')]
184
184
public function loginSuccess(TexterInterface $texter)
185
185
{
186
+ $options = (new ProviderOptions())
187
+ ->setPriority('high')
188
+ ;
189
+
186
190
$sms = new SmsMessage(
187
191
// the phone number to send the SMS message to
188
192
'+1411111111',
189
193
// the message
190
194
'A new login was detected!',
191
195
// optionally, you can override default "from" defined in transports
192
196
'+1422222222',
197
+ // you can also add options object implementing MessageOptionsInterface
198
+ $options
193
199
);
194
200
195
201
$sentMessage = $texter->send($sms);
@@ -202,6 +208,10 @@ send SMS messages::
202
208
203
209
The 3rd argument of ``SmsMessage `` (``$from ``) was introduced in Symfony 6.2.
204
210
211
+ .. versionadded :: 6.3
212
+
213
+ The 4th argument of ``SmsMessage `` (``$options ``) was introduced in Symfony 6.3.
214
+
205
215
The ``send() `` method returns a variable of type
206
216
:class: `Symfony\\ Component\\ Notifier\\ Message\\ SentMessage ` which provides
207
217
information such as the message ID and the original message contents.
You can’t perform that action at this time.
0 commit comments