tags:

views:

573

answers:

2

hello, i have an iphone 3g and can successfully send text messages using the PHP mail() function. My issue is that for each message i receive, the "telephone number" associated with the incoming text message changes each time. If possible, I would like to somehow make this number constant so that I can take advantage of iphone's ability to aggregate all text messages from the same telephone number -Otherwise my iphone would be cluttered with messages. Is there a way to do this?

an example of the numbers I receive would be 1(410) 000-001, 1(410) 000-002, 1(410) 000-003, etc... can i make this constant somehow?

$message = stripslashes("new user just joined!");

mail("[email protected]", "Subject", "$message");

please let me know! thanks...

+2  A: 

This is likely more to do with ATT than your PHP code.

Finbarr
makes sense, to take this in a new direction then, is it at all possible to use wildcards in creating iphone contacts?
Rees
No, there's not
John Sheehan
A: 

This is a limitation of the carrier's email-to-SMS gateway. There's no way to guarantee which number the message will come from.

SHAMELESS PROMO: You could use a service like Twilio (whom I work for) and get a phone number for $1/month which you would be able to always send from. There's a ton of PHP sample code to get you started. There are other SMS APIs out there as well so look around and find the one that you like best.

John Sheehan
hey john, i actually found twilio right after i made this post haha, and i'm using it right now! it's great and incredibly lightweight at 4k for the php api. ;)
Rees
Great to hear! hit me at [email protected] if you have any questions...
John Sheehan