Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: bakedjake
I know that some carriers have an address that will relay SMS (text messages) like an email so it would look something like this. You have to have some type of 'sendmail' program though.
email@example.com (this is an example and will not work)
This would send a text to the cellphone with the number
(555)555-5555 BUT ONLY if they were on Verizon... if they were on Bell then that wouldn't work.
You have to find how each carrier relays the text to the phone. Some may not allow you to others may. Based on what I have seen on other sites I think there is a way for each carrier but you have to find out the way and then when you set up the form you will have to have them choose the carrier then enter a number so that you can proceed with the carrier specific method of sending.
I can have a field for number and then a drop down of one of these providers. That would be fine. But then is there a special way to do the code to send these out?
So for you to send the message........Look into getting a sendmail program going on your server. Once you get one look at some examples for sending email. It is pretty straight forward.
It would look something like this (depending on your scripting language):
[edited by: Demaestro at 2:36 pm (utc) on May 3, 2007]
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Name"
Mailer.RemoteHost = "mail.server"
Mailer.AddRecipient "Cell", Request.Form("phone") & Request.Form("provider")
Mailer.Subject = "Information Request"
Mailer.BodyText = "text message info"
I will take a guess and say it might be because you aren't setting a mime type. It may require one. You would want to use text/plain. Also try taking out the subject. SMS doesn't really have a subject value. That also may be an issue as the relaying servers might not know what to do with it... I am guessing though.
Try sending to an email address first instead of a phone, just to make sure that your script is actually sending the email out.
If you get an email then it isn't the script and you can start looking at the relaying servers. Perhaps some of them want a 1 then the area code.
Keep posting. I am sure someone here will know about ASP. If no help comes and you get stuck try posting the question in the ASP forum. Someone may see something wrong with the way you are trying it.
[edited by: Demaestro at 3:35 pm (utc) on May 3, 2007]
No mime type should be needed, unless that is required by something at your end. It's just extra junk that the gateway will have to throw away.
Keep in mind that SMS messages are limited to 160 characters. Some gateways will break longer messages into multiple SMS messages. Some won't. You may have to come up with a table of capabilities and build it into your program or a database.
For more info, the Wikipedia entries on "SMS" and "SMS gateway" are good starts, and will lead you to sites with more definative information.
It's Not too hard if you can perl or php...
Each service has a little bit different interface.
Mine sends both the contact email and the cell phone text message.
Logs the lot and makes an addy entry.
There are rules in the US that apply.
'Short Codes' and all,,,
[edited by: encyclo at 11:06 pm (utc) on May 11, 2007]
[edit reason] no URLs please, see TOS #13 [webmasterworld.com] [/edit]