Jump to content

Message cutoff issue when text message is sent from php application using mail()


akula

Recommended Posts

Hi Friends,

 

I have a scenario where text message should be sent from PHP Application using native mail() function to user's mobile. This is done by concatenating mobile number with carrier's domain for text messages.

 

For example: Verizon's domain for sending text message is vtext.com so we send messages to <MOBILE_NUMBER>@vtext.com.

 

When messages are sent from application, for certain US Mobile carriers (Verizon, Sprint), the message is truncated and only part of the message is shown to user.

 

And for some US mobile carriers (T Mobile & AT&T), users received complete message that was sent from application.

 

To solve this problem, i can change the text message domain to mms domain like @vzwpix.com and with this, the users will be able to receive complete message but changing domain names for all the contacts in DB (thousands of them) does not seem to be good idea to me.

 

The question i have here is: Can this problem be handled within the application? If so, please let me know with some examples, if possible.

 

Thanks in advance for your time and help !!

 

 

Link to comment
Share on other sites

I'm sure you could do the update with a single query, but really you shouldn't be storing the full email address for exactly this reason: what if it changes?

So I suggest you strip the @domain.com, mark which carrier each user has (if you don't already), then modify the application to add the @domain.com back when sending the email.

 

Next best would be updating the records. Like I said a single query: update the records to number+@vzwpix.com when they match number@vtext.com (and you can get the "number" by taking everything up to the last 10 characters).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.