Skip to content

[Notifier] Add from in SmsMessage and support it in bridge transports #16701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion notifier/texters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ you to send SMS messages::
// the phone number to send the SMS message to
'+1411111111',
// the message
'A new login was detected!'
'A new login was detected!',
// optionally, you can override default "from" defined in transports
'+1422222222',
);

$sentMessage = $texter->send($sms);
Expand All @@ -32,6 +34,10 @@ you to send SMS messages::
}
}

.. versionadded:: 6.2

The 3rd argument of ``SmsMessage`` (``$from``) was introduced in Symfony 6.2.

The ``send()`` method returns a variable of type
:class:`Symfony\\Component\\Notifier\\Message\\SentMessage` which provides
information such as the message ID and the original message contents.
Expand Down