The Provider property returns the preferred wireless service
provider associated with the current phone number.
Changing the value of this property will change the preferred wireless
service provider. If this property is an empty string, the default
provider assigned to the recipient's phone number will be used. This
property is only used with messages sent using SMTP and is ignored for
other message services.
In the United States and Canada, most wireless common carriers are
required to provide wireless number portability (WNP) which allows a
customer to continue to use their current phone number even if they
switch to another service provider. This can result in a situation
where a specific phone number is shown as allocated to one provider,
but in actuality that user has switched to a different provider. For
example, a user may have originally purchased a phone and service with
AT&T and then later switched to Verizon, but decided to keep their
phone number. In this case, if Verizon was not specified as the
preferred provider, the library would attempt to send the message to
the AT&T gateway, since that was the original provider who allocated
the phone number.
For most applications, the correct way to handle the situation in
which a user may have switched to a different service provider is to
allow them to select a preferred provider in your user interface. For
example, you could display a drop-down list of available providers for
them to select from, populated using the ProviderName property
array. If they select a preferred provider, then you would assign that
value to this property. If they choose to use the default provider,
set this property to an empty string.