Can send SMS to Verizon Customers but not ATT and T-Mobile. (1 Viewer)

Local time
Yesterday, 20:16
Joined
Apr 25, 2019
Messages
62
I have a form based on a query that has a button on it to send a pre-made SMS message to the customer on that record, asking them to leave us a review. The VBA below works just fine for all our customers who use Verizon, but it does not work for ATT and T-Mobile customers.

To use this code, just replace the gmail account and password info where indicated (3 places) in the attached file with your own.

Can anyone help with this?
 

Attachments

  • Access not sending text.txt
    2.6 KB · Views: 277

plog

Banishment Pending
Local time
Yesterday, 20:16
Joined
May 11, 2011
Messages
11,638
Are you really sending SMS or are you sending an email to the number? Also--

strTo = strCustomerPhone & Me.CarrierBox

What's in Me.CarrierBox for each of the providers?
 

isladogs

MVP / VIP
Local time
Today, 02:16
Joined
Jan 14, 2017
Messages
18,209
I just looked at the attachment. You are sending an email using CDO. Not an SMS

BTW: GMail now has additional security which you have to deal with in order to use CDO with GMail.
For an explanation of how this is done, see the last page of the help file attached
This is supplied with my example app: EMail Tester - Mendip Data Systems
 

Attachments

  • EMailHelp.zip
    156.4 KB · Views: 275
Local time
Yesterday, 20:16
Joined
Apr 25, 2019
Messages
62
Are you really sending SMS or are you sending an email to the number? Also--

strTo = strCustomerPhone & Me.CarrierBox

What's in Me.CarrierBox for each of the providers?
I guess its an email to a cell phone number. Is there an easier way? I have links embedded in the email that need to be EASILY clickable by the customer.
 
Local time
Yesterday, 20:16
Joined
Apr 25, 2019
Messages
62
I guess its an email to a cell phone number. Is there an easier way? I have links embedded in the email that need to be EASILY clickable by the customer.
the carrierbox is the carrier that the user enters, like verizon, att , tmobile... that way the vba code can select the proper format to send.
 

plog

Banishment Pending
Local time
Yesterday, 20:16
Joined
May 11, 2011
Messages
11,638
the carrierbox is the carrier that the user enters, like verizon, att , tmobile... that way the vba code can select the proper format to send.

But your not selecting anything, your taking whats in there and appending it to the phone number. I would find out what exactly is in strTo for a number/carrier that works and what is in there for a number/carrier that doesn't work. My guess is you aren't choosing the right domain portion correctly for sending the email.
 
Local time
Yesterday, 20:16
Joined
Apr 25, 2019
Messages
62
once the user chooses the cell carrier, the final .To address is like one of these, depending on the carrier:

22225551212@vtext.com
22225551212@messaging.sprintpcs.com
22225551212@messaging.nextel.com
22225551212@voicestream.net
22225551212@tms.suncom.com
22225551212@message.alltel.com
22225551212@mms.att.net
22225551212@tmomail.net

then there is an if statement that chooses the proper final .To address depending on the carrier. Like I said, it works perfectly for ALL Verizon using the @vtext.com domain. I have tried the @mms.att.net as well as the @txt.att.net as well as the @sms.att.net and can not get any to work. Maybe there is some better code for sending an email to a cell phone as a Text?
 

Users who are viewing this thread

Top Bottom