Text Messages Not Received

I am using smtplib to send email messages to an email account and text messages to a cellphone number. Both have been working fine for months. Now the text messages are not getting received. The email messages are received at the email account.
From smtplib I use:
sendEmail(emailrecipient@account,subject, Message) to send email messages and:
to send text messages to the phone 1234567899.
The phone is using t-mobile.
I think the problem is with t-mobile because I added a line:
sendMail(‘9876543210@txt.att.net’,subject,Message) which goes to an att phone and that text is received every time.

How would I go about tracking this problem?

Does the code work with different addresses?
Can you successfully use other means (for example, someone else’s borrowed phone) in order to send messages to the problematic address?
When you run the code and try to send to the problematic address, do you see any error messages from the code?

(1) I can still confirm that the same message sent by the Python program to the AT@T phone gets through every time but the T-Mobile never gets through.

(2) If I use an email account to send an email to:
1234567899@tmomail.net it gets through.
So it seems that if the Python program sends the message to the T-Mobile phone it will fail.
I am starting to think T-Mobile doesn’t like something about the message but I don’t know how to catch any errors if T-Mobile sends any.