Page 1 of 1

Text Message Formatting

Posted: Wed May 25, 2022 2:08 pm
by bobvolz
I use the Alaska email functions to send text messages via email to the carriers such as Verizon, Att etc.

I test the system using my Android Samsung cell phone. The text messages are sent via the mms text sites like Verizon's VZWPIX.com.
On my phone they all look fine and are very readable. I am sending straight text with no HTML or PRE nodes.

I am now discovering that Apple iPhones format these messages differently than Android phones. The Apple phones treat the text messages as attachments
and when opened the font / text size is too small to read.

Does anyone have a sure fire way to format the messages prior to sending that would insure readability? For example should I encapsulate the message in HTML nodes
or <pre> nodes? Should I use HTML at all? I switched from the standard SMS sites like Verizon.net to VZWPIX.com to be able to send more than 155 characters.

Any help would be appreciated.

Bob Volz

Re: Text Message Formatting Issue Fixed

Posted: Wed Jun 15, 2022 3:09 pm
by bobvolz
After several attempts at a fix the fix was to change the message type from 'text\html' to ' text\plain' when sending as a text message.

Now it looks fine on both iPhones and Androids.

Does anyone else out there use text messaging via xBase++? I'm very surprised no one responded to this
question.

Bob Volz

Re: Text Message Formatting

Posted: Wed Jun 15, 2022 11:33 pm
by Tom
Hi, Bob.

We provide text messaging from our applications using three or four systems. It's almost the same technique everywhere - a REST with rather simple parameters. No problems at all.

Sending and formatting mails is a little more complicated.

Re: Text Message Formatting

Posted: Thu Jun 16, 2022 2:06 am
by reganc
Bob,

We also use a few text messaging services but ours are also all REST API based.

As Tom said it does make things easier because you just follow the documentation and supply text using only the formatting they tell you. They then deal with the output via SMS and their developer support is usually quite good if you do have any issues.

Re: Text Message Formatting

Posted: Thu Jun 16, 2022 2:16 am
by Tom
Most providers (Verizon aswell) have a REST API to send short messages. In most of the cases, the authentication is done using the header parameters, and the message itself and the recipient(s) are added as normal parameters. We do this with Xb2.Net, but it's almost the same with the http-functions in Xbase++ 2.0. Most of those API also allow to check the message status (delivery).

Re: Text Message Formatting

Posted: Thu Jun 16, 2022 7:13 am
by bobvolz
Thanks to all for the info. We do not use any outside service other than running it through SMTP@ionos.com. My code simply sends a string of text via SMTP Server (@ionos.com) to the persons
cell phone number @vzwpics.com or Att.net etc. No REST involved. I would like to make this better. I have xb2net as well. Perhaps one of you can point me in the right
direction to set up a direct REST to carriers like Verizon and TMobile.

Sending emails is done the same way via SMTP@ionos.com except the message type I use is text/html when sending as an email rather than text/plain.
I also encapsulate the email text string with <pre> text </pre>. This seems to work OK

Any help would be appreciated. I would like to make this bullet proof.

Thanks

Bob Volz

Re: Text Message Formatting

Posted: Thu Jun 16, 2022 7:44 am
by rdonnay
I have tried several text message services and haven't had any problems.
Why would you want to set the content-type to text/html anyway, when text messages are only plain text?

Re: Text Message Formatting

Posted: Thu Jun 16, 2022 9:41 am
by bobvolz
I was using the same message type for both text messages and emails.
I still send emails as text/html but text messages I use message type text/plain.

Oddly enough the text message works on Android phones using either text/html or text/plain.
When using text/html, Iphones display the text messages as attachments and when opening them the font is too small to read.

What services do you use to send text messages from within an application?

Bob Volz

Re: Text Message Formatting

Posted: Fri Jun 17, 2022 10:29 am
by rdonnay
What services do you use to send text messages from within an application?
We tried several services over the years.

I recall using EZTEXTING, but that was never pursued because they would only send out texts occasionally.
We also used text by email, but that turned out to be a boondoggle because you had to know the carrier of each recipient.

The latest method is a REST service created by the same guys who are writing the mobile app for the taxi system.
It seems to work fine with httpClient() even though there is nothing in the code that sets the content-type.

Re: Text Message Formatting

Posted: Sun Jun 19, 2022 6:13 am
by bobvolz
Hi Roger and All;
I have been using the email method for several years. I solved the 'carrier' issue by using the API
for Real_Validation.com Carrier Lookup. I do a post containing the cell number and they return the carrier name.
My hard coded program then assigns the correct text email address based on the return carrier name. Verizon = VZWPIX.com etc.
I have at least 10 carriers in the code already.

It is dirt cheap and I buy 5000 lookups at a time for like $50. The issue I had was the content type on some phones did not
like text/html. It works fine now for what we use it for. Most of our texts are one way notifications anyway but I believe if a
person responds to a text message it comes back to the senders email address.
I will verify that.
Happy Fathers Day!

Bob Volz